From cab1ad2759878ea663a33a63796b9d65d33b4b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sun, 14 Apr 2024 21:28:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miniprogram/api/flowable.js | 4 +- miniprogram/api/login.js | 16 + miniprogram/app.wxss | 10 + .../@vant/weapp/steps/index.js | 4 + .../@vant/weapp/steps/index.wxml | 62 +- .../@vant/weapp/steps/index.wxss | 2 +- .../project_checkDetection/add/index.js | 4 +- .../project_checkDetection/add/index.json | 1 + .../project_checkDetection/add/index.wxml | 1 + .../project_checkDetection/check/index.js | 4 +- .../project_checkDetection/check/index.json | 4 +- .../project_checkDetection/check/index.wxml | 1 + .../project_checkDetection/edit/index.js | 4 +- .../project_checkDetection/edit/index.json | 1 + .../project_checkDetection/edit/index.wxml | 1 + .../project_checkDetection/edit/index.wxss | 3 +- .../project_checkDetection/info/index.js | 413 +++++++------ .../project_checkDetection/info/index.json | 1 + .../project_checkDetection/info/index.wxml | 1 + .../project_checkDetection/info/index.wxss | 3 +- .../project_checkDetection/list/index.wxml | 2 +- .../pageage/project_checking/add/index.js | 4 +- .../pageage/project_checking/add/index.json | 1 + .../pageage/project_checking/add/index.wxml | 1 + .../pageage/project_checking/edit/index.js | 4 +- .../pageage/project_checking/edit/index.json | 1 + .../pageage/project_checking/edit/index.wxml | 1 + .../pageage/project_checking/edit/index.wxss | 3 +- .../pageage/project_checking/info/index.js | 353 ++++++----- .../pageage/project_checking/info/index.json | 1 + .../pageage/project_checking/info/index.wxml | 266 ++++---- .../pageage/project_checking/info/index.wxss | 3 +- .../pageage/project_checking/list/index.wxml | 2 +- .../pageage/project_deptWorks/list/index.wxml | 2 +- miniprogram/pageage/project_files/index.js | 2 +- miniprogram/pageage/project_files/index.wxml | 2 +- .../pageage/project_insurance/list/index.wxml | 2 +- .../pageage/project_materialSeal/add/index.js | 4 +- .../project_materialSeal/add/index.json | 1 + .../project_materialSeal/add/index.wxml | 1 + .../project_materialSeal/edit/index.js | 4 +- .../project_materialSeal/edit/index.json | 1 + .../project_materialSeal/edit/index.wxml | 1 + .../project_materialSeal/edit/index.wxss | 3 +- .../project_materialSeal/info/index.js | 571 +++++++++--------- .../project_materialSeal/info/index.json | 1 + .../project_materialSeal/info/index.wxml | 1 + .../project_materialSeal/info/index.wxss | 3 +- .../project_materialSeal/list/index.wxml | 2 +- .../pageage/project_measure/add/index.js | 4 +- .../pageage/project_measure/add/index.json | 1 + .../pageage/project_measure/add/index.wxml | 1 + .../pageage/project_measure/edit/index.js | 2 + .../pageage/project_measure/edit/index.json | 1 + .../pageage/project_measure/edit/index.wxml | 1 + .../pageage/project_measure/edit/index.wxss | 3 +- .../pageage/project_measure/info/index.js | 377 ++++++------ .../pageage/project_measure/info/index.json | 1 + .../pageage/project_measure/info/index.wxml | 1 + .../pageage/project_measure/info/index.wxss | 3 +- .../pageage/project_measure/list/index.wxml | 2 +- .../quality/add/index.js | 474 ++++++++------- .../quality/add/index.json | 1 + .../quality/add/index.wxml | 1 + .../quality/check/index.js | 4 +- .../quality/check/index.json | 3 + .../quality/check/index.wxml | 192 +++--- .../quality/draft/index.js | 2 + .../quality/draft/index.json | 1 + .../quality/draft/index.wxml | 3 +- .../quality/info/index.js | 411 +++++++------ .../quality/info/index.json | 6 +- .../quality/info/index.wxml | 1 + .../quality/list/index.js | 70 +++ .../quality/list/index.wxml | 6 +- .../quality/modify/index.js | 4 +- .../quality/modify/index.json | 3 + .../quality/modify/index.wxml | 1 + .../security/add/index.js | 17 +- .../security/add/index.json | 1 + .../security/add/index.wxml | 1 + .../security/check/index.js | 4 +- .../security/check/index.json | 3 + .../security/check/index.wxml | 1 + .../security/draft/index.js | 2 + .../security/draft/index.json | 1 + .../security/draft/index.wxml | 3 +- .../security/info/index.js | 15 +- .../security/info/index.json | 6 +- .../security/info/index.wxml | 1 + .../security/list/index.js | 70 +++ .../security/list/index.wxml | 6 +- .../security/modify/index.js | 4 +- .../security/modify/index.json | 3 + .../security/modify/index.wxml | 1 + .../pageage/project_schedule/list/index.wxml | 2 +- .../pageage/project_special/list/index.wxml | 2 +- .../pageage/project_standard/info/index.wxss | 3 +- .../pageage/project_standard/list/index.wxml | 2 +- .../pageage/project_train/list/index.wxml | 2 +- .../pages/components/user-infos/index.js | 19 +- .../pages/components/user-infos/index.wxml | 8 +- .../pages/components/user-infos/index.wxss | 4 +- miniprogram/pages/gongchengliebiao/index.js | 20 +- miniprogram/pages/login/index.js | 6 +- miniprogram/pages/map/map.js | 20 +- .../approveCheckDetection/index.js | 2 + .../approveCheckDetection/index.json | 1 + .../approveCheckDetection/index.wxml | 1 + .../approveCheckDetection/index.wxss | 3 +- .../project_approve/approveChecking/index.js | 2 + .../approveChecking/index.json | 1 + .../approveChecking/index.wxml | 1 + .../approveChecking/index.wxss | 3 +- .../approveMaterialSeal/index.js | 2 + .../approveMaterialSeal/index.json | 1 + .../approveMaterialSeal/index.wxml | 1 + .../approveMaterialSeal/index.wxss | 3 +- .../project_approve/approveMeasure/index.js | 2 + .../project_approve/approveMeasure/index.json | 1 + .../project_approve/approveMeasure/index.wxml | 1 + .../project_approve/approveMeasure/index.wxss | 3 +- miniprogram/pages/project_approve/index.wxml | 2 +- .../approveLeaveTask/index.js | 51 +- .../approveLeaveTask/index.json | 1 + .../approveLeaveTask/index.wxml | 6 +- .../approveLeaveTask/index.wxss | 9 +- .../project_flowable/approveTask/index.js | 59 +- .../project_flowable/approveTask/index.json | 1 + .../project_flowable/approveTask/index.wxml | 8 +- .../project_flowable/approveTask/index.wxss | 9 +- .../pages/project_flowable/await/index.js | 79 ++- .../pages/project_flowable/await/index.wxml | 2 +- .../project_flowable/detailLeaveTask/index.js | 46 +- .../detailLeaveTask/index.json | 1 + .../detailLeaveTask/index.wxml | 6 +- .../detailLeaveTask/index.wxss | 9 +- .../project_flowable/detailTask/index.js | 63 +- .../project_flowable/detailTask/index.json | 1 + .../project_flowable/detailTask/index.wxml | 6 +- .../project_flowable/detailTask/index.wxss | 9 +- .../project_flowable/editLeaveTask/index.js | 43 +- .../project_flowable/editLeaveTask/index.json | 1 + .../project_flowable/editLeaveTask/index.wxml | 6 +- .../project_flowable/editLeaveTask/index.wxss | 9 +- .../pages/project_flowable/editTask/index.js | 43 +- .../project_flowable/editTask/index.json | 1 + .../project_flowable/editTask/index.wxml | 6 +- .../project_flowable/editTask/index.wxss | 9 +- .../pages/project_flowable/finished/index.js | 6 +- .../project_flowable/finished/index.wxml | 11 +- .../project_flowable/initLeaveTask/index.js | 17 +- .../project_flowable/initLeaveTask/index.json | 1 + .../project_flowable/initLeaveTask/index.wxml | 5 +- .../project_flowable/initLeaveTask/index.wxss | 3 +- .../pages/project_flowable/initTask/index.js | 3 +- .../project_flowable/initTask/index.wxss | 12 +- .../myFlowDefinition/index.wxml | 2 +- .../project_flowable/myProcessIns/index.js | 6 +- .../project_flowable/myProcessIns/index.wxml | 11 +- miniprogram/pages/wx-auth/index.js | 19 +- miniprogram/pages/xiangmugaikuang/index.js | 25 + miniprogram/pages/xiangmugaikuang/index.wxml | 2 +- miniprogram/pages/xiangmugaikuang/index.wxss | 2 +- project.private.config.json | 3 +- 165 files changed, 2493 insertions(+), 1739 deletions(-) diff --git a/miniprogram/api/flowable.js b/miniprogram/api/flowable.js index d9750ee..b91da3f 100644 --- a/miniprogram/api/flowable.js +++ b/miniprogram/api/flowable.js @@ -21,7 +21,7 @@ export function startProcessInstance(data) { // 查询流程节点 export function readDeployNotes(deployId) { return request({ - url: '/wxApi/flowTask/readNotes/'+deployId, + url: '/wechat/flowTask/readDeployNotes/'+deployId, method: 'get' }) } @@ -136,7 +136,7 @@ export function myFinishedFlowTaskList(data) { // 根据条件查询所有流申请 export function allInstanceList(data) { return request({ - url: '/wxApi/flowTask/allList', + url: '/wechat/flowTask/allList', method: 'get', data: data }) diff --git a/miniprogram/api/login.js b/miniprogram/api/login.js index 80082a7..14ec30a 100644 --- a/miniprogram/api/login.js +++ b/miniprogram/api/login.js @@ -33,3 +33,19 @@ export function loginOut() { 'method': 'get' }) } + +// 查询公众号消息授权 +export function findOpenUserMsgId(openId) { + return request({ + 'url': '/wechat/findOpenUserMsgId/'+openId, + 'method': 'get' + }) +} + +// 删除公众号消息授权 +export function delOpenUserMsgId(openId) { + return request({ + 'url': '/wechat/delOpenUserMsgId/'+openId, + 'method': 'get' + }) +} \ No newline at end of file diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss index 8dbb445..d4804b2 100644 --- a/miniprogram/app.wxss +++ b/miniprogram/app.wxss @@ -1380,6 +1380,7 @@ swiper-item video { .color_green { color: #1ab400; + font-weight: 800; } .color_blue { @@ -1840,4 +1841,13 @@ swiper-item video { .inspect_list_info_data_2 { width: 100%; +} +.van-steps{ + background-color: transparent !important; +} +.van-step--horizontal .van-step__circle-container{ + background-color: transparent !important; +} +.van-steps--horizontal{ + padding: 10px 20px !important; } \ No newline at end of file diff --git a/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js b/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js index c41e5ad..e813ce1 100644 --- a/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js +++ b/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js @@ -8,6 +8,10 @@ component_1.VantComponent({ icon: String, steps: Array, active: Number, + rejectNode:{ + type: Number, + value: 100, + }, direction: { type: String, value: 'horizontal', diff --git a/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml b/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml index 6180b41..9bfdc53 100644 --- a/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml +++ b/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml @@ -2,53 +2,39 @@ - - - {{ item.text }} + + + {{ item.text }} {{ item.desc }} - - - + + + + + + + + - - + - + + -function get(index, active) { - if (index < active) { - return 'finish'; - } else if (index === active) { - return 'process'; + function get(index, active) { + if (index < active) { + return 'finish'; + } else if (index === active) { + return 'process'; + } + + return 'inactive'; } - return 'inactive'; -} - -module.exports = get; - + module.exports = get; + \ No newline at end of file diff --git a/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss b/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss index 2c50b1a..69565bf 100644 --- a/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss +++ b/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)} \ No newline at end of file +@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:2px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step__title{padding-bottom: 10rpx;} \ No newline at end of file diff --git a/miniprogram/pageage/project_checkDetection/add/index.js b/miniprogram/pageage/project_checkDetection/add/index.js index 3eaf3d2..1754ac9 100644 --- a/miniprogram/pageage/project_checkDetection/add/index.js +++ b/miniprogram/pageage/project_checkDetection/add/index.js @@ -24,7 +24,9 @@ Page({ witnessUserName:"", checkTime:"", laboratoryName:"", - qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}] + qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}], + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}], + active: 0 }, /** diff --git a/miniprogram/pageage/project_checkDetection/add/index.json b/miniprogram/pageage/project_checkDetection/add/index.json index aeb0384..93f269e 100644 --- a/miniprogram/pageage/project_checkDetection/add/index.json +++ b/miniprogram/pageage/project_checkDetection/add/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "van-steps": "@vant/weapp/steps/index", "van-overlay": "@vant/weapp/overlay/index" }, "navigationStyle":"custom" diff --git a/miniprogram/pageage/project_checkDetection/add/index.wxml b/miniprogram/pageage/project_checkDetection/add/index.wxml index 22d379e..826e902 100644 --- a/miniprogram/pageage/project_checkDetection/add/index.wxml +++ b/miniprogram/pageage/project_checkDetection/add/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_checkDetection/check/index.js b/miniprogram/pageage/project_checkDetection/check/index.js index 29ddc3a..6616eaa 100644 --- a/miniprogram/pageage/project_checkDetection/check/index.js +++ b/miniprogram/pageage/project_checkDetection/check/index.js @@ -18,7 +18,9 @@ Page({ detectionResult:"1", detectionFileData:[], fileType:["pdf","png","jpg","jpeg"], - request:app.globalData.reqUrl + request:app.globalData.reqUrl, + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}], + active: 2 }, /** diff --git a/miniprogram/pageage/project_checkDetection/check/index.json b/miniprogram/pageage/project_checkDetection/check/index.json index b7b4e0b..d04e3cc 100644 --- a/miniprogram/pageage/project_checkDetection/check/index.json +++ b/miniprogram/pageage/project_checkDetection/check/index.json @@ -1,4 +1,6 @@ { - "usingComponents": {"van-overlay": "@vant/weapp/overlay/index"}, + "usingComponents": { + "van-steps": "@vant/weapp/steps/index", + "van-overlay": "@vant/weapp/overlay/index"}, "navigationStyle":"custom" } \ No newline at end of file diff --git a/miniprogram/pageage/project_checkDetection/check/index.wxml b/miniprogram/pageage/project_checkDetection/check/index.wxml index 73f7bcd..499ede0 100644 --- a/miniprogram/pageage/project_checkDetection/check/index.wxml +++ b/miniprogram/pageage/project_checkDetection/check/index.wxml @@ -12,6 +12,7 @@ + diff --git a/miniprogram/pageage/project_checkDetection/edit/index.js b/miniprogram/pageage/project_checkDetection/edit/index.js index ee27328..e3a9668 100644 --- a/miniprogram/pageage/project_checkDetection/edit/index.js +++ b/miniprogram/pageage/project_checkDetection/edit/index.js @@ -34,7 +34,9 @@ Page({ qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}], detectionFileData:[], fileType:["pdf","png","jpg","jpeg"], - request:app.globalData.reqUrl + request:app.globalData.reqUrl, + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}], + active: 1 }, /** diff --git a/miniprogram/pageage/project_checkDetection/edit/index.json b/miniprogram/pageage/project_checkDetection/edit/index.json index 5c42e53..0c4e695 100644 --- a/miniprogram/pageage/project_checkDetection/edit/index.json +++ b/miniprogram/pageage/project_checkDetection/edit/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "van-steps": "@vant/weapp/steps/index", "van-overlay": "@vant/weapp/overlay/index", "van-collapse": "@vant/weapp/collapse", "van-collapse-item": "@vant/weapp/collapse-item" diff --git a/miniprogram/pageage/project_checkDetection/edit/index.wxml b/miniprogram/pageage/project_checkDetection/edit/index.wxml index 11b225d..8190a9b 100644 --- a/miniprogram/pageage/project_checkDetection/edit/index.wxml +++ b/miniprogram/pageage/project_checkDetection/edit/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_checkDetection/edit/index.wxss b/miniprogram/pageage/project_checkDetection/edit/index.wxss index b3d0a18..1d6aff4 100644 --- a/miniprogram/pageage/project_checkDetection/edit/index.wxss +++ b/miniprogram/pageage/project_checkDetection/edit/index.wxss @@ -28,7 +28,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_checkDetection/info/index.js b/miniprogram/pageage/project_checkDetection/info/index.js index 068a5db..9f916c2 100644 --- a/miniprogram/pageage/project_checkDetection/info/index.js +++ b/miniprogram/pageage/project_checkDetection/info/index.js @@ -2,119 +2,146 @@ const app = getApp() Page({ - /** - * 页面的初始数据 - */ - data: { - id:"", - infoData:{}, - loadShow:false, - loginName:"", - showDel:false, - detectionImageList:[], - minDetectionFileImages:[], - detectionFiles:[], - fileUrls:[], - activeName:"", - flowRecordList:[], - request:app.globalData.reqUrl - }, + /** + * 页面的初始数据 + */ + data: { + id: "", + infoData: {}, + loadShow: false, + loginName: "", + showDel: false, + detectionImageList: [], + minDetectionFileImages: [], + detectionFiles: [], + fileUrls: [], + activeName: "", + flowRecordList: [], + request: app.globalData.reqUrl, + flowNodes: [{ + text: '开始' + }, { + text: '提交申请' + }, { + text: '检测报告' + }, { + text: '监理审批' + }, { + text: '结束' + }], + active: 100 + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - let {id} = options - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:res=>{ - this.setData({ - id, - loginName:res.data.loginName - }) - this.getInfo(); - this.getAuditinfo(); - } - }) - }, - - /** - * 获取安全检查详情信息 - * - */ - getInfo(){ - let {id} = this.data - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectDetection/info', - method:"get", - data:{ - id:id - }, - success(res){ - res = res.data - if(res.code == 200){ - let imageUrls = []; - let minImageUrls = []; - let fileUrls = []; - let fileNames = []; - //判断附件 - if(res.data.detectionFile){ - res.data.detectionFile.split(',').forEach(element => { - let _file = element.split('.'); - _file = _file[_file.length-1].toLocaleUpperCase(); - //判断附件类型,如果是图片直接展示,非图片则显示附件 - if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){ - imageUrls.push(that.data.request+element); - minImageUrls.push(that.data.request+element+'.min.jpg'); - }else{ - let it = element.split('/'); - fileNames.push(it[it.length-1]); - fileUrls.push(element); - } - }); - } - that.setData({ - infoData:res.data, - detectionImageList:imageUrls, - minDetectionFileImages:minImageUrls, - detectionFiles:fileNames, - fileUrls, - loadShow:false - }) - //判断当前能否删除 - if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){ - that.setData({ - showDel:true - }) - } - } - } + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let { + id + } = options + //获取缓存数据 + wx.getStorage({ + key: 'userinfo', + success: res => { + this.setData({ + id, + loginName: res.data.loginName }) - }, + this.getInfo(); + this.getAuditinfo(); + } + }) + }, - /** - * 查询流程日志 - */ - getAuditinfo(){ - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo', - method:"get", - data:{ - fromType:"1", - fromId:this.data.id - }, - success(res){ - res = res.data - if(res.code == 200){ + /** + * 获取安全检查详情信息 + * + */ + getInfo() { + let { + id + } = this.data + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectDetection/info', + method: "get", + data: { + id: id + }, + success(res) { + res = res.data + if (res.code == 200) { + let state = that.data.active; + if (res.data.approveStatus == null) { + state = 2; + }else if (res.data.approveStatus == "1") { + state = 3; + } else if (res.data.approveStatus == "3") { + state = 2; + } + that.setData({ + active: state + }) + let imageUrls = []; + let minImageUrls = []; + let fileUrls = []; + let fileNames = []; + //判断附件 + if (res.data.detectionFile) { + res.data.detectionFile.split(',').forEach(element => { + let _file = element.split('.'); + _file = _file[_file.length - 1].toLocaleUpperCase(); + //判断附件类型,如果是图片直接展示,非图片则显示附件 + if (_file == "PNG" || _file == "JPG" || _file == "JPEG") { + imageUrls.push(that.data.request + element); + minImageUrls.push(that.data.request + element + '.min.jpg'); + } else { + let it = element.split('/'); + fileNames.push(it[it.length - 1]); + fileUrls.push(element); + } + }); + } + that.setData({ + infoData: res.data, + detectionImageList: imageUrls, + minDetectionFileImages: minImageUrls, + detectionFiles: fileNames, + fileUrls, + loadShow: false + }) + //判断当前能否删除 + if (res.data.createBy == that.data.loginName && res.data.approveStatus != "4") { that.setData({ - flowRecordList:res.data + showDel: true }) } } - }) + } + }) + }, + + /** + * 查询流程日志 + */ + getAuditinfo() { + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo', + method: "get", + data: { + fromType: "1", + fromId: this.data.id + }, + success(res) { + res = res.data + if (res.code == 200) { + that.setData({ + flowRecordList: res.data + }) + } + } + }) }, // 手风琴 @@ -124,44 +151,46 @@ Page({ }); }, - onDelete(){ - //弹出确认 - let that = this - wx.showModal({ - title: '提示', - content: '是否确定删除此条数据?', - success: function (sm) { - if (sm.confirm) { - // 用户点击了确定 可以调用了 - that.deleteData(); - } else if (sm.cancel) { - console.log('用户点击取消'); - } - } - }) - }, - deleteData(){ - let {id} = this.data - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectDetection/remove', - header: { - "Username": this.data.loginName, - }, - data:{ - id:id - }, - method:"get", - success(res){ - app.toast("删除成功!") - wx.redirectTo({ - url: `../list/index`, - }) - } + onDelete() { + //弹出确认 + let that = this + wx.showModal({ + title: '提示', + content: '是否确定删除此条数据?', + success: function (sm) { + if (sm.confirm) { + // 用户点击了确定 可以调用了 + that.deleteData(); + } else if (sm.cancel) { + console.log('用户点击取消'); + } + } + }) + }, + deleteData() { + let { + id + } = this.data + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectDetection/remove', + header: { + "Username": this.data.loginName, + }, + data: { + id: id + }, + method: "get", + success(res) { + app.toast("删除成功!") + wx.redirectTo({ + url: `../list/index`, }) - }, + } + }) + }, //跳转修改页面 - onUpdate:function(){ + onUpdate: function () { let id = this.data.id; wx.redirectTo({ url: `../edit/index?id=${id}`, @@ -169,88 +198,88 @@ Page({ }, //展示图片 - showImg:function(e){ - var that=this; + showImg: function (e) { + var that = this; wx.previewImage({ - urls: that.data.detectionImageList, - current: that.data.detectionImageList[e.currentTarget.dataset.index] + urls: that.data.detectionImageList, + current: that.data.detectionImageList[e.currentTarget.dataset.index] }) }, - downFile:function(e){ + downFile: function (e) { let that = this; wx.downloadFile({ // 示例 url,并非真实存在 - url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[0], + url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls[0], success: function (res) { const filePath = res.tempFilePath wx.openDocument({ - filePath: filePath, - success: function (res) { - console.log('打开文档成功') - }, - fail:function(res) { - console.log(res) - } + filePath: filePath, + success: function (res) { + console.log('打开文档成功') + }, + fail: function (res) { + console.log(res) + } }) } - }) - //app.toast("暂不支持下载!如需下载请前往后台管理系统!!") + }) + //app.toast("暂不支持下载!如需下载请前往后台管理系统!!") }, returnToPage: function () { /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ wx.redirectTo({ - url: '../list/index', + url: '../list/index', }) }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - }, + }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + /** + * 生命周期函数--监听页面显示 + */ + onShow() { - }, + }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { - }, + }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { - }, + }, - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { - }, + }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { - }, + }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - } + } }) \ No newline at end of file diff --git a/miniprogram/pageage/project_checkDetection/info/index.json b/miniprogram/pageage/project_checkDetection/info/index.json index 8f17a33..101553f 100644 --- a/miniprogram/pageage/project_checkDetection/info/index.json +++ b/miniprogram/pageage/project_checkDetection/info/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "van-steps": "@vant/weapp/steps/index", "van-collapse": "@vant/weapp/collapse", "van-collapse-item": "@vant/weapp/collapse-item" }, diff --git a/miniprogram/pageage/project_checkDetection/info/index.wxml b/miniprogram/pageage/project_checkDetection/info/index.wxml index b165adf..9886ce6 100644 --- a/miniprogram/pageage/project_checkDetection/info/index.wxml +++ b/miniprogram/pageage/project_checkDetection/info/index.wxml @@ -12,6 +12,7 @@ + diff --git a/miniprogram/pageage/project_checkDetection/info/index.wxss b/miniprogram/pageage/project_checkDetection/info/index.wxss index 029322f..bc7a2b7 100644 --- a/miniprogram/pageage/project_checkDetection/info/index.wxss +++ b/miniprogram/pageage/project_checkDetection/info/index.wxss @@ -44,7 +44,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_checkDetection/list/index.wxml b/miniprogram/pageage/project_checkDetection/list/index.wxml index f13a709..6c69b5b 100644 --- a/miniprogram/pageage/project_checkDetection/list/index.wxml +++ b/miniprogram/pageage/project_checkDetection/list/index.wxml @@ -43,7 +43,7 @@ - + 暂无数据 diff --git a/miniprogram/pageage/project_checking/add/index.js b/miniprogram/pageage/project_checking/add/index.js index 177831c..201f5e8 100644 --- a/miniprogram/pageage/project_checking/add/index.js +++ b/miniprogram/pageage/project_checking/add/index.js @@ -31,7 +31,9 @@ Page({ dataTypeLvl1List:[], dataTypeLvl2List:[], dataTypeLvl2AllList:[], - list:[{id:1,text:"合格"},{id:2,text:"不合格"}] + list:[{id:1,text:"合格"},{id:2,text:"不合格"}], + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}], + active: 0 }, /** diff --git a/miniprogram/pageage/project_checking/add/index.json b/miniprogram/pageage/project_checking/add/index.json index bd950dc..1e13121 100644 --- a/miniprogram/pageage/project_checking/add/index.json +++ b/miniprogram/pageage/project_checking/add/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "van-steps": "@vant/weapp/steps/index", "van-overlay": "@vant/weapp/overlay/index" }, "navigationStyle":"custom", diff --git a/miniprogram/pageage/project_checking/add/index.wxml b/miniprogram/pageage/project_checking/add/index.wxml index 870c7c4..dcc3bac 100644 --- a/miniprogram/pageage/project_checking/add/index.wxml +++ b/miniprogram/pageage/project_checking/add/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_checking/edit/index.js b/miniprogram/pageage/project_checking/edit/index.js index 207198f..c92c0ef 100644 --- a/miniprogram/pageage/project_checking/edit/index.js +++ b/miniprogram/pageage/project_checking/edit/index.js @@ -36,7 +36,9 @@ Page({ dataTypeLvl2List:[], dataTypeLvl2AllList:[], list:[{id:1,text:"合格"},{id:2,text:"不合格"}], - request:app.globalData.reqUrl + request:app.globalData.reqUrl, + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}], + active: 1 }, /** diff --git a/miniprogram/pageage/project_checking/edit/index.json b/miniprogram/pageage/project_checking/edit/index.json index 025d779..156870d 100644 --- a/miniprogram/pageage/project_checking/edit/index.json +++ b/miniprogram/pageage/project_checking/edit/index.json @@ -2,6 +2,7 @@ "usingComponents": { "van-overlay": "@vant/weapp/overlay/index", "van-collapse": "@vant/weapp/collapse", + "van-steps": "@vant/weapp/steps/index", "van-collapse-item": "@vant/weapp/collapse-item" }, "navigationStyle":"custom", diff --git a/miniprogram/pageage/project_checking/edit/index.wxml b/miniprogram/pageage/project_checking/edit/index.wxml index 7ded209..20ec963 100644 --- a/miniprogram/pageage/project_checking/edit/index.wxml +++ b/miniprogram/pageage/project_checking/edit/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_checking/edit/index.wxss b/miniprogram/pageage/project_checking/edit/index.wxss index 21845b5..4746c01 100644 --- a/miniprogram/pageage/project_checking/edit/index.wxss +++ b/miniprogram/pageage/project_checking/edit/index.wxss @@ -34,7 +34,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_checking/info/index.js b/miniprogram/pageage/project_checking/info/index.js index 2f7acc8..0df76b8 100644 --- a/miniprogram/pageage/project_checking/info/index.js +++ b/miniprogram/pageage/project_checking/info/index.js @@ -2,83 +2,106 @@ const app = getApp() Page({ - /** - * 页面的初始数据 - */ - data: { - id:"", - infoData:{}, - imageList:[], - minImageList:[], - loadShow:false, - loginName:"", - showDel:false, - activeName:"", - flowRecordList:[], - request:app.globalData.reqUrl - }, + /** + * 页面的初始数据 + */ + data: { + id: "", + infoData: {}, + imageList: [], + minImageList: [], + loadShow: false, + loginName: "", + showDel: false, + activeName: "", + flowRecordList: [], + request: app.globalData.reqUrl, + flowNodes: [{ + text: '开始' + }, { + text: '提交申请' + }, { + text: '监理审批' + }, { + text: '结束' + }], + active: 100 + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - let {id} = options - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:res=>{ - this.setData({ - id, - loginName:res.data.loginName - }) - this.getInfo(); - this.getAuditinfo(); - } - }) - }, - - /** - * 获取安全检查详情信息 - * - */ - getInfo(){ - let {id} = this.data - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectchecking/info', - method:"get", - data:{ - id:id - }, - success(res){ - res = res.data - if(res.code == 200){ - let urls = []; - let minUrls = []; - if(res.data.imageUrls){ - res.data.imageUrls.split(',').forEach(element => { - urls.push(that.data.request+element); - minUrls.push(that.data.request+element+'.min.jpg'); - }); - } - that.setData({ - infoData:res.data, - imageList:urls, - minImageList:minUrls, - loadShow:false - }) - //判断当前能否删除 - if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){ - that.setData({ - showDel:true - }) - } - } - } + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let { + id + } = options + //获取缓存数据 + wx.getStorage({ + key: 'userinfo', + success: res => { + this.setData({ + id, + loginName: res.data.loginName }) - }, + this.getInfo(); + this.getAuditinfo(); + } + }) + }, - onDelete(){ + /** + * 获取安全检查详情信息 + * + */ + getInfo() { + let { + id + } = this.data + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectchecking/info', + method: "get", + data: { + id: id + }, + success(res) { + res = res.data + if (res.code == 200) { + let state = that.data.active; + if (res.data.approveStatus == "1") { + state = 2; + } else if (res.data.approveStatus == "3") { + state = 1; + } + that.setData({ + active: state + }) + let urls = []; + let minUrls = []; + if (res.data.imageUrls) { + res.data.imageUrls.split(',').forEach(element => { + urls.push(that.data.request + element); + minUrls.push(that.data.request + element + '.min.jpg'); + }); + } + that.setData({ + infoData: res.data, + imageList: urls, + minImageList: minUrls, + loadShow: false + }) + //判断当前能否删除 + if (res.data.createBy == that.data.loginName && res.data.approveStatus != "4") { + that.setData({ + showDel: true + }) + } + } + } + }) + }, + + onDelete() { //弹出确认 let that = this wx.showModal({ @@ -86,64 +109,66 @@ Page({ content: '是否确定删除此条数据?', success: function (sm) { if (sm.confirm) { - // 用户点击了确定 可以调用了 - that.deleteData(); - } else if (sm.cancel) { - console.log('用户点击取消'); - } + // 用户点击了确定 可以调用了 + that.deleteData(); + } else if (sm.cancel) { + console.log('用户点击取消'); } - }) - }, - deleteData(){ - let {id} = this.data - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectchecking/remove', - header: { - "Username": this.data.loginName, - }, - data:{ - id:id - }, - method:"get", - success(res){ - app.toast("删除成功!") - wx.navigateTo({ - url: `../list/index`, - }) - } - }) + } + }) + }, + deleteData() { + let { + id + } = this.data + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectchecking/remove', + header: { + "Username": this.data.loginName, + }, + data: { + id: id + }, + method: "get", + success(res) { + app.toast("删除成功!") + wx.navigateTo({ + url: `../list/index`, + }) + } + }) }, //跳转修改页面 - onUpdate:function(){ + onUpdate: function () { let id = this.data.id; - let dataTypeLvl1= this.data.infoData.dataTypeLvl1; + let dataTypeLvl1 = this.data.infoData.dataTypeLvl1; wx.redirectTo({ url: `../edit/index?id=${id}&dt1=${dataTypeLvl1}`, }) }, - /** - * 查询流程日志 - */ - getAuditinfo(){ - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo', - method:"get", - data:{ - fromType:"3", - fromId:this.data.id - }, - success(res){ - res = res.data - if(res.code == 200){ - that.setData({ - flowRecordList:res.data - }) - } + /** + * 查询流程日志 + */ + getAuditinfo() { + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo', + method: "get", + data: { + fromType: "3", + fromId: this.data.id + }, + success(res) { + res = res.data + if (res.code == 200) { + that.setData({ + flowRecordList: res.data + }) } - }) + } + }) }, // 手风琴 @@ -153,68 +178,68 @@ Page({ }); }, - //展示图片 - showImg:function(e){ - var that=this; - wx.previewImage({ - urls: that.data.imageList, - current: that.data.imageList[e.currentTarget.dataset.index] - }) + //展示图片 + showImg: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) }, returnToPage: function () { /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ wx.navigateTo({ - url: '../list/index', + url: '../list/index', }) }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - }, + }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + /** + * 生命周期函数--监听页面显示 + */ + onShow() { - }, + }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { - }, + }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { - }, + }, - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { - }, + }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { - }, + }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - } + } }) \ No newline at end of file diff --git a/miniprogram/pageage/project_checking/info/index.json b/miniprogram/pageage/project_checking/info/index.json index ec4d810..ec325a5 100644 --- a/miniprogram/pageage/project_checking/info/index.json +++ b/miniprogram/pageage/project_checking/info/index.json @@ -2,6 +2,7 @@ "usingComponents": { "van-popup": "@vant/weapp/popup/index", "van-collapse": "@vant/weapp/collapse", + "van-steps": "@vant/weapp/steps/index", "van-collapse-item": "@vant/weapp/collapse-item" }, "navigationStyle":"custom", diff --git a/miniprogram/pageage/project_checking/info/index.wxml b/miniprogram/pageage/project_checking/info/index.wxml index 23a8551..9ff2407 100644 --- a/miniprogram/pageage/project_checking/info/index.wxml +++ b/miniprogram/pageage/project_checking/info/index.wxml @@ -1,138 +1,148 @@ - - - - - - - 举牌验收详情 - - - + + + + + + + + + 举牌验收详情 + + + - - - - - - - - - - - {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}} - - 提交举牌验收 - 审批举牌验收 - 合格 - 不合格 + + + + + + + + + + + + {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}} + + 提交举牌验收 + 审批举牌验收 + 合格 + 不合格 + + + + + + 办理用户:{{item.userName}} + + + 办理单位:{{item.deptName}} + + + 办理时间:{{item.createTime}} + + + 审批意见:{{item.comment}} + - - 办理用户:{{item.userName}} - 办理单位:{{item.deptName}} - 办理时间:{{item.createTime}} - 审批意见:{{item.comment}} - + + + + + + {{infoData.projectName}} + + + + + 单位名称 + {{infoData.deptName}} + + + + + 验收图片 + + + - - - - - - {{infoData.projectName}} - - - - - 单位名称 - {{infoData.deptName}} - - - - - 验收图片 - - - - - - - - - - 验收类型 - {{infoData.dataTypeLvl1Name}} - - - - - 类型分类 - {{infoData.dataTypeLvl2Name}} - - - - - 质量专员 - {{infoData.qualityUserName}} {{infoData.qualityUser}} - - - - - 监理专员 - {{infoData.superviseUserName}} {{infoData.superviseUser}} - - - - - 工序部位 - {{infoData.checkWorkingPosition}} - - - - - 验收描述 - {{infoData.intro}} - - - - - 验收时间 - {{infoData.checkingDate}} - - - - - 验收结果 - - 待审批 - 合格 - 不合格 - - + + + + + 验收类型 + {{infoData.dataTypeLvl1Name}} + + + + + 类型分类 + {{infoData.dataTypeLvl2Name}} + + + + + 质量专员 + {{infoData.qualityUserName}} {{infoData.qualityUser}} + + + + + 监理专员 + {{infoData.superviseUserName}} {{infoData.superviseUser}} + + + + + 工序部位 + {{infoData.checkWorkingPosition}} + + + + + 验收描述 + {{infoData.intro}} + + + + + 验收时间 + {{infoData.checkingDate}} + + + + + 验收结果 + + 待审批 + 合格 + 不合格 + + + + + + 提交时间 + {{infoData.createTime}} + + + + + 提交用户 + {{infoData.createBy}} + + - - - 提交时间 - {{infoData.createTime}} - - - - - 提交用户 - {{infoData.createBy}} - - - - - - - 删除 - 修改 - - - + + + + 删除 + 修改 + + \ No newline at end of file diff --git a/miniprogram/pageage/project_checking/info/index.wxss b/miniprogram/pageage/project_checking/info/index.wxss index 029322f..bc7a2b7 100644 --- a/miniprogram/pageage/project_checking/info/index.wxss +++ b/miniprogram/pageage/project_checking/info/index.wxss @@ -44,7 +44,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_checking/list/index.wxml b/miniprogram/pageage/project_checking/list/index.wxml index 698225c..8730d8e 100644 --- a/miniprogram/pageage/project_checking/list/index.wxml +++ b/miniprogram/pageage/project_checking/list/index.wxml @@ -50,7 +50,7 @@ - + 暂无数据 diff --git a/miniprogram/pageage/project_deptWorks/list/index.wxml b/miniprogram/pageage/project_deptWorks/list/index.wxml index 3674d63..14f4df0 100644 --- a/miniprogram/pageage/project_deptWorks/list/index.wxml +++ b/miniprogram/pageage/project_deptWorks/list/index.wxml @@ -41,7 +41,7 @@ - + 暂无数据 diff --git a/miniprogram/pageage/project_files/index.js b/miniprogram/pageage/project_files/index.js index d80f327..e64a148 100644 --- a/miniprogram/pageage/project_files/index.js +++ b/miniprogram/pageage/project_files/index.js @@ -46,7 +46,7 @@ Page({ let fileDepts = ""; if(res.data.minRoleId>3){ if(res.data.minRoleId==4){ - fileDepts += app.globalData.projectInfoList[0].projectInfoList[0].deptId; + fileDepts += app.globalData.projectInfoList[0].deptId; }else{ app.globalData.projectInfoList.forEach(pro =>{ fileDepts += pro.projectInfoList[0].deptId; diff --git a/miniprogram/pageage/project_files/index.wxml b/miniprogram/pageage/project_files/index.wxml index 1baa98f..b4e78d9 100644 --- a/miniprogram/pageage/project_files/index.wxml +++ b/miniprogram/pageage/project_files/index.wxml @@ -57,7 +57,7 @@ - + 暂无数据 diff --git a/miniprogram/pageage/project_insurance/list/index.wxml b/miniprogram/pageage/project_insurance/list/index.wxml index 2f80a0e..17537b6 100644 --- a/miniprogram/pageage/project_insurance/list/index.wxml +++ b/miniprogram/pageage/project_insurance/list/index.wxml @@ -39,7 +39,7 @@ - + 暂无数据 diff --git a/miniprogram/pageage/project_materialSeal/add/index.js b/miniprogram/pageage/project_materialSeal/add/index.js index 9f63445..90593eb 100644 --- a/miniprogram/pageage/project_materialSeal/add/index.js +++ b/miniprogram/pageage/project_materialSeal/add/index.js @@ -24,7 +24,9 @@ Page({ showBgd:false, rectifierData:[], witnessUser:"", - witnessUserName:"" + witnessUserName:"", + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}], + active: 0 }, /** diff --git a/miniprogram/pageage/project_materialSeal/add/index.json b/miniprogram/pageage/project_materialSeal/add/index.json index 7576d93..86417bf 100644 --- a/miniprogram/pageage/project_materialSeal/add/index.json +++ b/miniprogram/pageage/project_materialSeal/add/index.json @@ -6,6 +6,7 @@ "van-picker": "@vant/weapp/picker/index", "van-area": "@vant/weapp/area/index", "mkl-multi-select": "/components/@mkl/multi-select/index", + "van-steps": "@vant/weapp/steps/index", "van-overlay": "@vant/weapp/overlay/index" }, "navigationStyle":"custom" diff --git a/miniprogram/pageage/project_materialSeal/add/index.wxml b/miniprogram/pageage/project_materialSeal/add/index.wxml index a64c2dd..b0ee414 100644 --- a/miniprogram/pageage/project_materialSeal/add/index.wxml +++ b/miniprogram/pageage/project_materialSeal/add/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_materialSeal/edit/index.js b/miniprogram/pageage/project_materialSeal/edit/index.js index c39e085..e3dbd93 100644 --- a/miniprogram/pageage/project_materialSeal/edit/index.js +++ b/miniprogram/pageage/project_materialSeal/edit/index.js @@ -28,7 +28,9 @@ Page({ activeName:"", flowRecordList:[], infoData:{}, - request:app.globalData.reqUrl + request:app.globalData.reqUrl, + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}], + active: 1 }, /** diff --git a/miniprogram/pageage/project_materialSeal/edit/index.json b/miniprogram/pageage/project_materialSeal/edit/index.json index 8b96c47..7fa2cab 100644 --- a/miniprogram/pageage/project_materialSeal/edit/index.json +++ b/miniprogram/pageage/project_materialSeal/edit/index.json @@ -8,6 +8,7 @@ "mkl-multi-select": "/components/@mkl/multi-select/index", "van-overlay": "@vant/weapp/overlay/index", "van-collapse": "@vant/weapp/collapse", + "van-steps": "@vant/weapp/steps/index", "van-collapse-item": "@vant/weapp/collapse-item" }, "navigationStyle":"custom" diff --git a/miniprogram/pageage/project_materialSeal/edit/index.wxml b/miniprogram/pageage/project_materialSeal/edit/index.wxml index 9df6b1b..0b07517 100644 --- a/miniprogram/pageage/project_materialSeal/edit/index.wxml +++ b/miniprogram/pageage/project_materialSeal/edit/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_materialSeal/edit/index.wxss b/miniprogram/pageage/project_materialSeal/edit/index.wxss index 2eb6356..bd0fbd0 100644 --- a/miniprogram/pageage/project_materialSeal/edit/index.wxss +++ b/miniprogram/pageage/project_materialSeal/edit/index.wxss @@ -67,7 +67,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_materialSeal/info/index.js b/miniprogram/pageage/project_materialSeal/info/index.js index 0586be5..3fc0d4f 100644 --- a/miniprogram/pageage/project_materialSeal/info/index.js +++ b/miniprogram/pageage/project_materialSeal/info/index.js @@ -2,139 +2,162 @@ const app = getApp() Page({ - /** - * 页面的初始数据 - */ - data: { - id:"", - infoData:{}, - imageList:[], - minImageList:[], - loadShow:false, - loginName:"", - showDel:false, - signFileNames:[], - minSignFileImages:[], - signFileImages:[], - alterationFileNames:[], - minAlterationFileImages:[], - alterationFileImages:[], - fileUrls:[], - fileUrls2:[], - activeName:"", - flowRecordList:[], - request:app.globalData.reqUrl - }, + /** + * 页面的初始数据 + */ + data: { + id: "", + infoData: {}, + imageList: [], + minImageList: [], + loadShow: false, + loginName: "", + showDel: false, + signFileNames: [], + minSignFileImages: [], + signFileImages: [], + alterationFileNames: [], + minAlterationFileImages: [], + alterationFileImages: [], + fileUrls: [], + fileUrls2: [], + activeName: "", + flowRecordList: [], + request: app.globalData.reqUrl, + flowNodes: [{ + text: '开始' + }, { + text: '提交申请' + }, { + text: '监理审批' + }, { + text: '结束' + }], + active: 100 + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - let {id} = options - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:res=>{ - this.setData({ - id, - loginName:res.data.loginName - }) - this.getInfo(); - this.getAuditinfo(); - } - }) - }, - - /** - * 获取安全检查详情信息 - * - */ - getInfo(){ - let {id} = this.data - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectMaterialSeal/info', - method:"get", - data:{ - id:id - }, - success(res){ - res = res.data - if(res.code == 200){ - let urls = []; - let minUrls = []; - if(res.data.imageUrls){ - res.data.imageUrls.split(',').forEach(element => { - urls.push(that.data.request+element); - minUrls.push(that.data.request+element+'.min.jpg'); - }); - } - let fileNames = []; - let minFileImages = []; - let fileImages = []; - let fileUrls = []; - //判断附件 - if(res.data.signFiles){ - res.data.signFiles.split(',').forEach(element => { - let _file = element.split('.'); - _file = _file[_file.length-1].toLocaleUpperCase(); - //判断附件类型,如果是图片直接展示,非图片则显示附件 - if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){ - fileImages.push(that.data.request+element); - minFileImages.push(that.data.request+element+'.min.jpg'); - }else{ - let it = element.split('/'); - fileNames.push(it[it.length-1]); - fileUrls.push(element); - } - }); - } - let fileNames2 = []; - let minFileImages2 = []; - let fileImages2 = []; - let fileUrls2 = []; - //判断附件 - if(res.data.alterationFiles){ - res.data.alterationFiles.split(',').forEach(element => { - let _file = element.split('.'); - _file = _file[_file.length-1].toLocaleUpperCase(); - //判断附件类型,如果是图片直接展示,非图片则显示附件 - if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){ - fileImages2.push(that.data.request+element); - minFileImages2.push(that.data.request+element+'.min.jpg'); - }else{ - let it = element.split('/'); - fileNames2.push(it[it.length-1]); - fileUrls2.push(element); - } - }); - } - that.setData({ - fileUrls, - fileUrls2, - signFileNames:fileNames, - minSignFileImages:minFileImages, - signFileImages:fileImages, - alterationFileNames:fileNames2, - minAlterationFileImages:minFileImages2, - alterationFileImages:fileImages2, - infoData:res.data, - imageList:urls, - minImageList:minUrls, - loadShow:false - }) - //判断当前能否删除 - if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){ - that.setData({ - showDel:true - }) - } - } - } + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let { + id + } = options + //获取缓存数据 + wx.getStorage({ + key: 'userinfo', + success: res => { + this.setData({ + id, + loginName: res.data.loginName }) - }, + this.getInfo(); + this.getAuditinfo(); + } + }) + }, - onDelete(){ + /** + * 获取安全检查详情信息 + * + */ + getInfo() { + let { + id + } = this.data + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectMaterialSeal/info', + method: "get", + data: { + id: id + }, + success(res) { + res = res.data + if (res.code == 200) { + let state = that.data.active; + if (res.data.approveStatus == "1") { + state = 2; + } else if (res.data.approveStatus == "3") { + state = 1; + } + that.setData({ + active: state + }) + let urls = []; + let minUrls = []; + if (res.data.imageUrls) { + res.data.imageUrls.split(',').forEach(element => { + urls.push(that.data.request + element); + minUrls.push(that.data.request + element + '.min.jpg'); + }); + } + let fileNames = []; + let minFileImages = []; + let fileImages = []; + let fileUrls = []; + //判断附件 + if (res.data.signFiles) { + res.data.signFiles.split(',').forEach(element => { + let _file = element.split('.'); + _file = _file[_file.length - 1].toLocaleUpperCase(); + //判断附件类型,如果是图片直接展示,非图片则显示附件 + if (_file == "PNG" || _file == "JPG" || _file == "JPEG") { + fileImages.push(that.data.request + element); + minFileImages.push(that.data.request + element + '.min.jpg'); + } else { + let it = element.split('/'); + fileNames.push(it[it.length - 1]); + fileUrls.push(element); + } + }); + } + let fileNames2 = []; + let minFileImages2 = []; + let fileImages2 = []; + let fileUrls2 = []; + //判断附件 + if (res.data.alterationFiles) { + res.data.alterationFiles.split(',').forEach(element => { + let _file = element.split('.'); + _file = _file[_file.length - 1].toLocaleUpperCase(); + //判断附件类型,如果是图片直接展示,非图片则显示附件 + if (_file == "PNG" || _file == "JPG" || _file == "JPEG") { + fileImages2.push(that.data.request + element); + minFileImages2.push(that.data.request + element + '.min.jpg'); + } else { + let it = element.split('/'); + fileNames2.push(it[it.length - 1]); + fileUrls2.push(element); + } + }); + } + that.setData({ + fileUrls, + fileUrls2, + signFileNames: fileNames, + minSignFileImages: minFileImages, + signFileImages: fileImages, + alterationFileNames: fileNames2, + minAlterationFileImages: minFileImages2, + alterationFileImages: fileImages2, + infoData: res.data, + imageList: urls, + minImageList: minUrls, + loadShow: false + }) + //判断当前能否删除 + if (res.data.createBy == that.data.loginName && res.data.approveStatus != "4") { + that.setData({ + showDel: true + }) + } + } + } + }) + }, + + onDelete() { //弹出确认 let that = this wx.showModal({ @@ -142,37 +165,39 @@ Page({ content: '是否确定删除此条数据?', success: function (sm) { if (sm.confirm) { - // 用户点击了确定 可以调用了 - that.deleteData(); - } else if (sm.cancel) { - console.log('用户点击取消'); - } + // 用户点击了确定 可以调用了 + that.deleteData(); + } else if (sm.cancel) { + console.log('用户点击取消'); } - }) - }, - deleteData(){ - let {id} = this.data - let that = this; - wx.request({ - url: app.globalData.reqUrl+"/wechat/projectMaterialSeal/remove", - header: { - "Username": this.data.loginName, - }, - data:{ - id:id - }, - method:"get", - success(res){ - app.toast("删除成功!") - wx.redirectTo({ - url: `../list/index` - }) - } - }) + } + }) + }, + deleteData() { + let { + id + } = this.data + let that = this; + wx.request({ + url: app.globalData.reqUrl + "/wechat/projectMaterialSeal/remove", + header: { + "Username": this.data.loginName, + }, + data: { + id: id + }, + method: "get", + success(res) { + app.toast("删除成功!") + wx.redirectTo({ + url: `../list/index` + }) + } + }) }, //跳转修改页面 - onUpdate:function(){ + onUpdate: function () { let id = this.data.id; wx.redirectTo({ url: `../edit/index?id=${id}`, @@ -180,26 +205,26 @@ Page({ }, /** - * 查询流程日志 - */ - getAuditinfo(){ - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo', - method:"get", - data:{ - fromType:"4", - fromId:this.data.id - }, - success(res){ - res = res.data - if(res.code == 200){ - that.setData({ - flowRecordList:res.data - }) - } + * 查询流程日志 + */ + getAuditinfo() { + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo', + method: "get", + data: { + fromType: "4", + fromId: this.data.id + }, + success(res) { + res = res.data + if (res.code == 200) { + that.setData({ + flowRecordList: res.data + }) } - }) + } + }) }, // 手风琴 @@ -209,130 +234,130 @@ Page({ }); }, - //展示图片 - showImg:function(e){ - var that=this; - wx.previewImage({ - urls: that.data.imageList, - current: that.data.imageList[e.currentTarget.dataset.index] - }) + //展示图片 + showImg: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) }, - //展示图片 - showSignFileImg:function(e){ - var that=this; - wx.previewImage({ - urls: that.data.signFileImages, - current: that.data.signFileImages[e.currentTarget.dataset.index] - }) - }, + //展示图片 + showSignFileImg: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.signFileImages, + current: that.data.signFileImages[e.currentTarget.dataset.index] + }) + }, - //展示图片 - showAlterationFileImg:function(e){ - var that=this; - wx.previewImage({ - urls: that.data.alterationFileImages, - current: that.data.alterationFileImages[e.currentTarget.dataset.index] - }) - }, + //展示图片 + showAlterationFileImg: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.alterationFileImages, + current: that.data.alterationFileImages[e.currentTarget.dataset.index] + }) + }, - downFile:function(e){ - let idx = e.currentTarget.dataset['index']; - let that = this; - wx.downloadFile({ - // 示例 url,并非真实存在 - url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx], - success: function (res) { - const filePath = res.tempFilePath - wx.openDocument({ - filePath: filePath, - success: function (res) { - console.log('打开文档成功') - }, - fail:function(res) { - console.log(res) - } - }) - } + downFile: function (e) { + let idx = e.currentTarget.dataset['index']; + let that = this; + wx.downloadFile({ + // 示例 url,并非真实存在 + url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls[idx], + success: function (res) { + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + success: function (res) { + console.log('打开文档成功') + }, + fail: function (res) { + console.log(res) + } + }) + } }) //app.toast("暂不支持下载!如需下载请前往后台管理系统!!") - }, + }, - downFile2:function(e){ - let idx = e.currentTarget.dataset['index']; - let that = this; - wx.downloadFile({ - // 示例 url,并非真实存在 - url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls2[idx], - success: function (res) { - const filePath = res.tempFilePath - wx.openDocument({ - filePath: filePath, - success: function (res) { - console.log('打开文档成功') - }, - fail:function(res) { - console.log(res) - } - }) - } + downFile2: function (e) { + let idx = e.currentTarget.dataset['index']; + let that = this; + wx.downloadFile({ + // 示例 url,并非真实存在 + url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls2[idx], + success: function (res) { + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + success: function (res) { + console.log('打开文档成功') + }, + fail: function (res) { + console.log(res) + } + }) + } }) //app.toast("暂不支持下载!如需下载请前往后台管理系统!!") - }, + }, returnToPage: function () { /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ wx.redirectTo({ - url: '../list/index' + url: '../list/index' }) }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - }, + }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + /** + * 生命周期函数--监听页面显示 + */ + onShow() { - }, + }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { - }, + }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { - }, + }, - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { - }, + }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { - }, + }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - } + } }) \ No newline at end of file diff --git a/miniprogram/pageage/project_materialSeal/info/index.json b/miniprogram/pageage/project_materialSeal/info/index.json index b6d8dd8..af272cb 100644 --- a/miniprogram/pageage/project_materialSeal/info/index.json +++ b/miniprogram/pageage/project_materialSeal/info/index.json @@ -2,6 +2,7 @@ "usingComponents": { "van-popup": "@vant/weapp/popup/index", "van-collapse": "@vant/weapp/collapse", + "van-steps": "@vant/weapp/steps/index", "van-collapse-item": "@vant/weapp/collapse-item" }, "navigationStyle":"custom", diff --git a/miniprogram/pageage/project_materialSeal/info/index.wxml b/miniprogram/pageage/project_materialSeal/info/index.wxml index 16f3475..f8f81cf 100644 --- a/miniprogram/pageage/project_materialSeal/info/index.wxml +++ b/miniprogram/pageage/project_materialSeal/info/index.wxml @@ -12,6 +12,7 @@ + diff --git a/miniprogram/pageage/project_materialSeal/info/index.wxss b/miniprogram/pageage/project_materialSeal/info/index.wxss index 029322f..bc7a2b7 100644 --- a/miniprogram/pageage/project_materialSeal/info/index.wxss +++ b/miniprogram/pageage/project_materialSeal/info/index.wxss @@ -44,7 +44,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_materialSeal/list/index.wxml b/miniprogram/pageage/project_materialSeal/list/index.wxml index dae8cb6..e4bce98 100644 --- a/miniprogram/pageage/project_materialSeal/list/index.wxml +++ b/miniprogram/pageage/project_materialSeal/list/index.wxml @@ -46,7 +46,7 @@ - + 暂无数据 diff --git a/miniprogram/pageage/project_measure/add/index.js b/miniprogram/pageage/project_measure/add/index.js index 9252d80..0ec062e 100644 --- a/miniprogram/pageage/project_measure/add/index.js +++ b/miniprogram/pageage/project_measure/add/index.js @@ -39,7 +39,9 @@ Page({ id: 2, text: "不合格" }], - fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"] + fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"], + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}], + active: 0 }, /** diff --git a/miniprogram/pageage/project_measure/add/index.json b/miniprogram/pageage/project_measure/add/index.json index aeb0384..21213b2 100644 --- a/miniprogram/pageage/project_measure/add/index.json +++ b/miniprogram/pageage/project_measure/add/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "van-steps": "@vant/weapp/steps/index", "van-overlay": "@vant/weapp/overlay/index" }, "navigationStyle":"custom" diff --git a/miniprogram/pageage/project_measure/add/index.wxml b/miniprogram/pageage/project_measure/add/index.wxml index 9e96806..aa2e8dd 100644 --- a/miniprogram/pageage/project_measure/add/index.wxml +++ b/miniprogram/pageage/project_measure/add/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_measure/edit/index.js b/miniprogram/pageage/project_measure/edit/index.js index 060489f..3ca992f 100644 --- a/miniprogram/pageage/project_measure/edit/index.js +++ b/miniprogram/pageage/project_measure/edit/index.js @@ -27,6 +27,8 @@ Page({ type: "", info: "", filesData: [], + flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}], + active: 1 }, /** diff --git a/miniprogram/pageage/project_measure/edit/index.json b/miniprogram/pageage/project_measure/edit/index.json index 5c42e53..804b5fd 100644 --- a/miniprogram/pageage/project_measure/edit/index.json +++ b/miniprogram/pageage/project_measure/edit/index.json @@ -2,6 +2,7 @@ "usingComponents": { "van-overlay": "@vant/weapp/overlay/index", "van-collapse": "@vant/weapp/collapse", + "van-steps": "@vant/weapp/steps/index", "van-collapse-item": "@vant/weapp/collapse-item" }, "navigationStyle":"custom" diff --git a/miniprogram/pageage/project_measure/edit/index.wxml b/miniprogram/pageage/project_measure/edit/index.wxml index e1b5e5a..93fb0a1 100644 --- a/miniprogram/pageage/project_measure/edit/index.wxml +++ b/miniprogram/pageage/project_measure/edit/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_measure/edit/index.wxss b/miniprogram/pageage/project_measure/edit/index.wxss index b3d0a18..1d6aff4 100644 --- a/miniprogram/pageage/project_measure/edit/index.wxss +++ b/miniprogram/pageage/project_measure/edit/index.wxss @@ -28,7 +28,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_measure/info/index.js b/miniprogram/pageage/project_measure/info/index.js index e089dc0..9cc88d8 100644 --- a/miniprogram/pageage/project_measure/info/index.js +++ b/miniprogram/pageage/project_measure/info/index.js @@ -2,141 +2,166 @@ const app = getApp() Page({ - /** - * 页面的初始数据 - */ - data: { - id:"", - infoData:{}, - loadShow:false, - loginName:"", - showDel:false, - imageList:[], - minImageList:[], - activeName:"", - flowRecordList:[], - request:app.globalData.reqUrl - }, + /** + * 页面的初始数据 + */ + data: { + id: "", + infoData: {}, + loadShow: false, + loginName: "", + showDel: false, + imageList: [], + minImageList: [], + activeName: "", + flowRecordList: [], + request: app.globalData.reqUrl, + flowNodes: [{ + text: '开始' + }, { + text: '提交申请' + }, { + text: '监理审批' + }, { + text: '结束' + }], + active: 100 + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - let {id} = options - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:res=>{ - this.setData({ - id, - loginName:res.data.loginName - }) - this.getInfo(); - this.getAuditinfo(); - } - }) - }, - - - /** - * 获取安全检查详情信息 - * - */ - getInfo(){ - let {id} = this.data - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectMeasure/info', - method:"get", - data:{ - id:id - }, - success(res){ - res = res.data - if(res.code == 200){ - let urls = []; - let minUrls = []; - if(res.data.imageUrls){ - res.data.imageUrls.split(',').forEach(element => { - urls.push(that.data.request+element); - minUrls.push(that.data.request+element+'.min.jpg'); - }); - } - that.setData({ - infoData:res.data, - imageList:urls, - minImageList:minUrls, - loadShow:false - }) - //判断当前能否删除 - if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){ - that.setData({ - showDel:true - }) - } - } - } + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let { + id + } = options + //获取缓存数据 + wx.getStorage({ + key: 'userinfo', + success: res => { + this.setData({ + id, + loginName: res.data.loginName }) - }, + this.getInfo(); + this.getAuditinfo(); + } + }) + }, - onDelete(){ - //弹出确认 - let that = this - wx.showModal({ - title: '提示', - content: '是否确定删除此条数据?', - success: function (sm) { - if (sm.confirm) { - // 用户点击了确定 可以调用了 - that.deleteData(); - } else if (sm.cancel) { - console.log('用户点击取消'); - } - } - }) - }, - deleteData(){ - let {id} = this.data - let that = this; - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectMeasure/remove', - header: { - "Username": that.data.loginName, - }, - data:{ - id:id - }, - method:"get", - success(res){ - app.toast("删除成功!") - wx.redirectTo({ - url: `../list/index`, - }) - } - }) - }, - /** - * 查询流程日志 - */ - getAuditinfo(){ - let that = this - wx.request({ - url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo', - method:"get", - data:{ - fromType:"2", - fromId:this.data.id - }, - success(res){ - res = res.data - if(res.code == 200){ + /** + * 获取安全检查详情信息 + * + */ + getInfo() { + let { + id + } = this.data + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectMeasure/info', + method: "get", + data: { + id: id + }, + success(res) { + res = res.data + if (res.code == 200) { + let state = that.data.active; + if (res.data.approveStatus == "1") { + state = 2; + } else if (res.data.approveStatus == "3") { + state = 1; + } + that.setData({ + active: state + }) + let urls = []; + let minUrls = []; + if (res.data.imageUrls) { + res.data.imageUrls.split(',').forEach(element => { + urls.push(that.data.request + element); + minUrls.push(that.data.request + element + '.min.jpg'); + }); + } + that.setData({ + infoData: res.data, + imageList: urls, + minImageList: minUrls, + loadShow: false + }) + //判断当前能否删除 + if (res.data.createBy == that.data.loginName && res.data.approveStatus != "4") { that.setData({ - flowRecordList:res.data + showDel: true }) } } - }) + } + }) + }, + + onDelete() { + //弹出确认 + let that = this + wx.showModal({ + title: '提示', + content: '是否确定删除此条数据?', + success: function (sm) { + if (sm.confirm) { + // 用户点击了确定 可以调用了 + that.deleteData(); + } else if (sm.cancel) { + console.log('用户点击取消'); + } + } + }) + }, + deleteData() { + let { + id + } = this.data + let that = this; + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectMeasure/remove', + header: { + "Username": that.data.loginName, + }, + data: { + id: id + }, + method: "get", + success(res) { + app.toast("删除成功!") + wx.redirectTo({ + url: `../list/index`, + }) + } + }) + }, + + /** + * 查询流程日志 + */ + getAuditinfo() { + let that = this + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo', + method: "get", + data: { + fromType: "2", + fromId: this.data.id + }, + success(res) { + res = res.data + if (res.code == 200) { + that.setData({ + flowRecordList: res.data + }) + } + } + }) }, // 手风琴 @@ -147,75 +172,75 @@ Page({ }, //跳转修改页面 - onUpdate:function(){ + onUpdate: function () { let id = this.data.id; wx.redirectTo({ url: `../edit/index?id=${id}&measureType=${this.data.infoData.measureType}&measureInfo=${this.data.infoData.measureInfo}`, }) }, - //展示图片 - showImg:function(e){ - var that=this; - wx.previewImage({ - urls: that.data.imageList, - current: that.data.imageList[e.currentTarget.dataset.index] - }) + //展示图片 + showImg: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) }, - returnToPage: function () { - /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ - wx.redirectTo({ - url: '../list/index', - }) - }, + returnToPage: function () { + /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ + wx.redirectTo({ + url: '../list/index', + }) + }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - }, + }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + /** + * 生命周期函数--监听页面显示 + */ + onShow() { - }, + }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { - }, + }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { - }, + }, - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { - }, + }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { - }, + }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - } + } }) \ No newline at end of file diff --git a/miniprogram/pageage/project_measure/info/index.json b/miniprogram/pageage/project_measure/info/index.json index 1f022fa..a397ba7 100644 --- a/miniprogram/pageage/project_measure/info/index.json +++ b/miniprogram/pageage/project_measure/info/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "van-steps": "@vant/weapp/steps/index", "van-collapse": "@vant/weapp/collapse", "van-collapse-item": "@vant/weapp/collapse-item" }, diff --git a/miniprogram/pageage/project_measure/info/index.wxml b/miniprogram/pageage/project_measure/info/index.wxml index 3b4e23e..7df9930 100644 --- a/miniprogram/pageage/project_measure/info/index.wxml +++ b/miniprogram/pageage/project_measure/info/index.wxml @@ -12,6 +12,7 @@ + diff --git a/miniprogram/pageage/project_measure/info/index.wxss b/miniprogram/pageage/project_measure/info/index.wxss index 029322f..bc7a2b7 100644 --- a/miniprogram/pageage/project_measure/info/index.wxss +++ b/miniprogram/pageage/project_measure/info/index.wxss @@ -44,7 +44,8 @@ } .van-cell.van-cell--clickable{ background-color: #2b345b; - margin-top: 30rpx; + margin-top: 5rpx; + margin-bottom: 5rpx; color: #fff; border-radius: 15rpx; diff --git a/miniprogram/pageage/project_measure/list/index.wxml b/miniprogram/pageage/project_measure/list/index.wxml index 5c10e66..a60c15b 100644 --- a/miniprogram/pageage/project_measure/list/index.wxml +++ b/miniprogram/pageage/project_measure/list/index.wxml @@ -46,7 +46,7 @@ - + 暂无数据 diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.js b/miniprogram/pageage/project_problemmodify/quality/add/index.js index 364df80..dc02eb3 100644 --- a/miniprogram/pageage/project_problemmodify/quality/add/index.js +++ b/miniprogram/pageage/project_problemmodify/quality/add/index.js @@ -6,157 +6,184 @@ Page({ * 页面的初始数据 */ data: { - maxDate:new Date(2088,1,1).getTime(), - minDate:new Date().getTime()+(3600*48*1000), - projectId:"", - projectName:"", - loginName:"", - userName:"", - rectifierData:[], - rectifierData2:[], - rectifierData3:[], - imageInfoData:[], + maxDate: new Date(2088, 1, 1).getTime(), + minDate: new Date().getTime() + (3600 * 48 * 1000), + projectId: "", + projectName: "", + loginName: "", + userName: "", + rectifierData: [], + rectifierData2: [], + rectifierData3: [], + imageInfoData: [], //验收时间 - nickedTime:'', - loadShow:false, - lordSent:"", - lordSentUser:"", - copySend:"", - copySendUser:"", - recheckSend:"", - recheckSendUser:"", - workParts:"", - changeInfo:"", - dangerType:"1", - dangerTypeList:[], - selectValue:"", - selectIndex:"", - problemType:"1", - showHis:false, - problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}] + nickedTime: '', + loadShow: false, + lordSent: "", + lordSentUser: "", + copySend: "", + copySendUser: "", + recheckSend: "", + recheckSendUser: "", + workParts: "", + changeInfo: "", + dangerType: "1", + dangerTypeList: [], + selectValue: "", + selectIndex: "", + problemType: "1", + showHis: false, + problemTypeList: [{ + id: "1", + text: "常规检查" + }, { + id: "2", + text: "专项检查" + }], + flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}], + active: 0 }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - let {projectId,projectName} = options + let { + projectId, + projectName + } = options //获取缓存数据 wx.getStorage({ - key: 'userinfo', - success:res=>{ - this.setData({ - projectId:app.globalData.projectId, - projectName:app.globalData.projectName, - loginName:res.data.loginName, - userName:res.data.nickName, - recheckSend:res.data.nickName, - recheckSendUser:res.data.loginName - }) - this.getAllProjectUserData(); - this.getDangerTypeList(); - this.getHisInfo(); - } - }) + key: 'userinfo', + success: res => { + this.setData({ + projectId: app.globalData.projectId, + projectName: app.globalData.projectName, + loginName: res.data.loginName, + userName: res.data.nickName, + recheckSend: res.data.nickName, + recheckSendUser: res.data.loginName + }) + this.getAllProjectUserData(); + this.getDangerTypeList(); + this.getHisInfo(); + } + }) }, //查询项目人员数据 - getAllProjectUserData(){ + getAllProjectUserData() { let that = this wx.request({ - url: app.globalData.reqUrl+'/wechat/projectuserinfo/queryAllProjectUserByParams', - method:"get", - data:{ - projectId:that.data.projectId, - loginName:that.data.loginName + url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams', + method: "get", + data: { + projectId: that.data.projectId, + loginName: that.data.loginName }, - header:{ - 'content-type': 'application/x-www-form-urlencoded' + header: { + 'content-type': 'application/x-www-form-urlencoded' }, - success(res){ + success(res) { res = res.data - if(res.code == 200){ + if (res.code == 200) { that.setData({ - rectifierData:res.data, - rectifierData3:res.data, + rectifierData: res.data, + rectifierData3: res.data, }) } } }) wx.request({ - url: app.globalData.reqUrl+'/wechat/projectuserinfo/queryAllProjectUserByParams', - method:"get", - data:{ - projectId:that.data.projectId, - loginName:that.data.loginName, - selectMy:'Y' + url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams', + method: "get", + data: { + projectId: that.data.projectId, + loginName: that.data.loginName, + selectMy: 'Y' }, - header:{ - 'content-type': 'application/x-www-form-urlencoded' + header: { + 'content-type': 'application/x-www-form-urlencoded' }, - success(res){ - res = res.data - if(res.code == 200){ + success(res) { + res = res.data; + if (res.code == 200) { + let findMy = false; + res.data.forEach(it => { + if (it.userinfoList.length > 0) { + it.userinfoList.forEach(u => { + if (that.data.loginName == u.phonenumber) { + findMy = true; + } + }); + } + }); + if(!findMy){ + res.data[0].userinfoList.push({state:false,nickName:that.data.userName,jobTypeName:'集团公司',phonenumber:that.data.loginName}); + } that.setData({ - rectifierData2:res.data, + rectifierData2: res.data, }) } } }) }, - getHisInfo(){ + getHisInfo() { //这里查询当前登录人上次提交隐患,自动填充整改人,复检人,抄送人 let that = this wx.request({ - url: app.globalData.reqUrl+'/wechat/projectProblemmodify/findLastDataByParams', - method:"get", - data:{ - projectId:that.data.projectId, - createUser:that.data.loginName, - infoType:1 + url: app.globalData.reqUrl + '/wechat/projectProblemmodify/findLastDataByParams', + method: "get", + data: { + projectId: that.data.projectId, + createUser: that.data.loginName, + infoType: 1 }, - header:{ - 'content-type': 'application/x-www-form-urlencoded' + header: { + 'content-type': 'application/x-www-form-urlencoded' }, - success(res){ + success(res) { res = res.data - if(res.code == 200 && res.data){ + if (res.code == 200 && res.data) { that.setData({ - showHis:true, - lordSent:res.data.lordSent, - lordSentUser:res.data.lordSentUser, - recheckSend:res.data.recheckSend, - recheckSendUser:res.data.recheckSendUser, - copySend:res.data.copySend, - copySendUser:res.data.copySendUser + showHis: true, + lordSent: res.data.lordSent, + lordSentUser: res.data.lordSentUser, + recheckSend: res.data.recheckSend, + recheckSendUser: res.data.recheckSendUser, + copySend: res.data.copySend, + copySendUser: res.data.copySendUser }) } } }) }, - getDangerTypeList(){ + getDangerTypeList() { let that = this wx.request({ - url: app.globalData.reqUrl+'/wechat/projectProblemmodify/queryDangerType', - method:"get", - data:{ - type:'ssp_zlyhlx' + url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryDangerType', + method: "get", + data: { + type: 'ssp_zlyhlx' }, - header:{ - 'content-type': 'application/x-www-form-urlencoded' + header: { + 'content-type': 'application/x-www-form-urlencoded' }, - success(res){ + success(res) { res = res.data - if(res.code == 200){ - let list=[]; - res.data.forEach(it =>{ - list.push({"id":it.dictValue,"text":it.dictLabel}); + if (res.code == 200) { + let list = []; + res.data.forEach(it => { + list.push({ + "id": it.dictValue, + "text": it.dictLabel + }); }) that.setData({ - dangerTypeList:list + dangerTypeList: list }) } } @@ -164,7 +191,7 @@ Page({ }, //隐患描述 - onInputWorkParts(e){ + onInputWorkParts(e) { let workParts = e.detail.value this.setData({ workParts @@ -172,7 +199,7 @@ Page({ }, //整改要求 - onInputChangeInfoValue(e){ + onInputChangeInfoValue(e) { let changeInfo = e.detail.value this.setData({ changeInfo @@ -180,7 +207,7 @@ Page({ }, //验收时间 - onInputTime(e){ + onInputTime(e) { let nickedTime = e.detail this.setData({ nickedTime @@ -188,161 +215,178 @@ Page({ }, // list 上传图片 - onImagesArr(e){ + onImagesArr(e) { var data = this.data.imageInfoData data = e.detail this.setData({ - imageInfoData:data + imageInfoData: data }) }, //添加整改人 - onAddLordSent(e){ - if(e.detail.length>0){ + onAddLordSent(e) { + if (e.detail.length > 0) { this.setData({ - lordSent:e.detail[0].userName, - lordSentUser:e.detail[0].phoneNumber + lordSent: e.detail[0].userName, + lordSentUser: e.detail[0].phoneNumber }) } }, //添加抄送人 - onAddCopySend(e){ - if(e.detail.length>0){ - let phoneNumbers=""; - let userNames=""; - e.detail.forEach(it =>{ - phoneNumbers+=","+it.phoneNumber; - userNames+=","+it.userName; + onAddCopySend(e) { + if (e.detail.length > 0) { + let phoneNumbers = ""; + let userNames = ""; + e.detail.forEach(it => { + phoneNumbers += "," + it.phoneNumber; + userNames += "," + it.userName; }); this.setData({ - copySend:userNames.substring(1), - copySendUser:phoneNumbers.substring(1) + copySend: userNames.substring(1), + copySendUser: phoneNumbers.substring(1) }) - }else{ + } else { this.setData({ - copySend:"", - copySendUser:"" + copySend: "", + copySendUser: "" }) } }, //添加复检人 - onAddRecheckSend(e){ - if(e.detail.length>0){ + onAddRecheckSend(e) { + if (e.detail.length > 0) { this.setData({ - recheckSend:e.detail[0].userName, - recheckSendUser:e.detail[0].phoneNumber + recheckSend: e.detail[0].userName, + recheckSendUser: e.detail[0].phoneNumber }) } }, - + //取消页面 - cancelSaveView(){ + cancelSaveView() { this.returnToPage() }, //保存 - onProblemSubmitSave(){ + onProblemSubmitSave() { this.setData({ - loadShow:true + loadShow: true }) let that = this - let {projectId,projectName,dangerType,lordSent,lordSentUser,copySend,copySendUser,workParts,changeInfo,nickedTime,recheckSend,recheckSendUser,imageInfoData,loginName,problemType,userName} = that.data; + let { + projectId, + projectName, + dangerType, + lordSent, + lordSentUser, + copySend, + copySendUser, + workParts, + changeInfo, + nickedTime, + recheckSend, + recheckSendUser, + imageInfoData, + loginName, + problemType, + userName + } = that.data; //数据效验 - if(projectId==""||loginName==""){ + if (projectId == "" || loginName == "") { app.toast("数据异常,请刷新页面重试!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(imageInfoData.length==0){ + if (imageInfoData.length == 0) { app.toast("请上传隐患现场图片!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(problemType==""){ + if (problemType == "") { app.toast("请选择检查类型!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(dangerType==""){ + if (dangerType == "") { app.toast("请选择隐患类型!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(workParts==""){ + if (workParts == "") { app.toast("请填写隐患描述!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(changeInfo==""){ + if (changeInfo == "") { app.toast("请填写隐患整改要求!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(nickedTime==""){ + if (nickedTime == "") { app.toast("请选择整改截至时间!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(lordSent==""||lordSentUser==""){ + if (lordSent == "" || lordSentUser == "") { app.toast("请选择整改人!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(recheckSend==""||recheckSendUser==""){ + if (recheckSend == "" || recheckSendUser == "") { app.toast("请选择复检人!") that.setData({ - loadShow:false + loadShow: false }) return; } - if(copySend==""||copySendUser==""){ + if (copySend == "" || copySendUser == "") { app.toast("请选择抄送人!") that.setData({ - loadShow:false + loadShow: false }) return; } let pos = copySend.split(","); - pos.forEach(it =>{ - if(it==lordSent){ + pos.forEach(it => { + if (it == lordSent) { app.toast("抄送人中不能包含整改人!") that.setData({ - loadShow:false + loadShow: false }) return; } }); let fileUrls = []; - imageInfoData.forEach(async (item)=>{ - let uploadUrl = app.globalData.uploadUrl+'/common/upload' - let name = "file" + imageInfoData.forEach(async (item) => { + let uploadUrl = app.globalData.uploadUrl + '/common/upload' + let name = "file" //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片 - let obj = await that.syncUploadImage(uploadUrl,item,name); + let obj = await that.syncUploadImage(uploadUrl, item, name); fileUrls.push(obj.data.fileName); //验证图片上传完毕 - if(fileUrls.length == imageInfoData.length){ + if (fileUrls.length == imageInfoData.length) { let params = { projectId, - infoType:"1", - problemArea:projectName, + infoType: "1", + problemArea: projectName, problemType, workParts, changeInfo, @@ -350,95 +394,97 @@ Page({ lordSentUser, copySend, copySendUser, - checkState:0, - nickedTime:nickedTime+" 23:59:59", - smarkUrl:fileUrls.toString(), - createUser:loginName, + checkState: 0, + nickedTime: nickedTime + " 23:59:59", + smarkUrl: fileUrls.toString(), + createUser: loginName, dangerType, recheckSend, recheckSendUser } wx.request({ url: app.globalData.reqUrl + '/wechat/projectProblemmodify/addQuality', - method:"POST", - data:params, + method: "POST", + data: params, header: { "Username": loginName, "Content-Type": "application/json" }, - success(res){ + success(res) { that.setData({ - loadShow:false + loadShow: false }) - res =res.data - if(res.code == 200){ + res = res.data + if (res.code == 200) { app.toast("添加成功!") - setTimeout(()=>{ - wx.redirectTo({ - url: '../list/index', - }) - },200) + setTimeout(() => { + wx.redirectTo({ + url: '../list/index', + }) + }, 200) } } - }) - } - }) + }) + } + }) }, /** * 这里考虑上传图片异步问题,封装为同步 */ - syncUploadImage(url,uploadFile,name) { + syncUploadImage(url, uploadFile, name) { return new Promise((resolve, reject) => { wx.uploadFile({ - url, // 上传的服务器接口地址 - filePath: uploadFile, - header: { - "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" - }, - name, //上传的所需字段,后端提供 - formData: { user: 'test' }, - success: (res) => { - // 上传完成操作 - const data = JSON.parse(res.data) - resolve({ - data: data - }) - }, - fail: (err) => { - //上传失败:修改pedding为reject - console.log("访问接口失败", err); - wx.showToast({ - title: "网络出错,上传失败", - icon: 'none', - duration: 1000 - }); - reject(err) - } + url, // 上传的服务器接口地址 + filePath: uploadFile, + header: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" + }, + name, //上传的所需字段,后端提供 + formData: { + user: 'test' + }, + success: (res) => { + // 上传完成操作 + const data = JSON.parse(res.data) + resolve({ + data: data + }) + }, + fail: (err) => { + //上传失败:修改pedding为reject + console.log("访问接口失败", err); + wx.showToast({ + title: "网络出错,上传失败", + icon: 'none', + duration: 1000 + }); + reject(err) + } }); }) }, //选择检查类型 - onSelectProblemType(e){ + onSelectProblemType(e) { this.setData({ - problemType:e.detail.id + problemType: e.detail.id }) }, //选择隐患类型 - onSelectDangerType(e){ - this.setData({ - dangerType:e.detail.id - }) - }, + onSelectDangerType(e) { + this.setData({ + dangerType: e.detail.id + }) + }, - returnToPage: function () { - /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ - wx.redirectTo({ - url: '../list/index', - }) - }, + returnToPage: function () { + /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ + wx.redirectTo({ + url: '../list/index', + }) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.json b/miniprogram/pageage/project_problemmodify/quality/add/index.json index 29ba37b..d58fcd4 100644 --- a/miniprogram/pageage/project_problemmodify/quality/add/index.json +++ b/miniprogram/pageage/project_problemmodify/quality/add/index.json @@ -1,5 +1,6 @@ { "usingComponents": { + "van-steps": "@vant/weapp/steps/index", "van-overlay": "@vant/weapp/overlay/index" }, "navigationStyle":"custom", diff --git a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml index d6e4bd0..3ade737 100644 --- a/miniprogram/pageage/project_problemmodify/quality/add/index.wxml +++ b/miniprogram/pageage/project_problemmodify/quality/add/index.wxml @@ -12,6 +12,7 @@ + {{projectName}} diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.js b/miniprogram/pageage/project_problemmodify/quality/check/index.js index 3959def..8c1981f 100644 --- a/miniprogram/pageage/project_problemmodify/quality/check/index.js +++ b/miniprogram/pageage/project_problemmodify/quality/check/index.js @@ -18,7 +18,9 @@ Page({ minImageList:[], auditImageList:[], auditMinImageList:[], - request:app.globalData.reqUrl + request:app.globalData.reqUrl, + flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}], + active: 3 }, /** diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.json b/miniprogram/pageage/project_problemmodify/quality/check/index.json index c95b086..d4934fa 100644 --- a/miniprogram/pageage/project_problemmodify/quality/check/index.json +++ b/miniprogram/pageage/project_problemmodify/quality/check/index.json @@ -1,6 +1,9 @@ { "usingComponents": { "van-popup": "@vant/weapp/popup/index", + "van-collapse": "@vant/weapp/collapse", + "van-steps": "@vant/weapp/steps/index", + "van-collapse-item": "@vant/weapp/collapse-item", "van-overlay": "@vant/weapp/overlay/index" }, "navigationStyle":"custom", diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml index 87efd61..4d4a70d 100644 --- a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml +++ b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml @@ -1,43 +1,98 @@ - - - - - - - 质量隐患复检 - - - + + + + + + + + + 质量隐患复检 + + + + {{infoData.problemArea}} + + + + + + + + + + {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}} + {{item.taskName}}{{item.commentResult}} + {{item.commentResult}} + {{item.commentResult}} + {{item.commentResult}} + + + + + + 办理用户:{{item.assigneeName}} + + + 办理单位:{{item.deptName}} + + + 候选办理:{{item.candidate}} + + + 驳回节点:{{item.deleteReason}} + + + 接收时间:{{item.startTime}} + + + 处理时间:{{item.endTime}} + + + 处理耗时:{{item.duration}} + + + 处理意见:{{item.message}} + + + + + + + + - 隐患图片 - - - - + + + + - - 问题类型 - - 常规检查 - 专项检查 - - - + + 问题类型 + + 常规检查 + 专项检查 + + + 隐患类型 @@ -103,56 +158,55 @@ - - 问题整改 + + 问题整改 + + + + + 整改说明 + {{auditInfo.opinion}} + - - - - 整改说明 - {{auditInfo.opinion}} - - - - - 整改后图片 - - - - - - - - - - 完成时间 - {{infoData.nickedTime}} - - - + + + 整改后图片 + + + + + + + + + + 完成时间 + {{infoData.nickedTime}} + + + - - 整改复检意见 - - - - -