提交代码

main
姜玉琦 2024-04-14 21:28:11 +08:00
parent 366a897e54
commit cab1ad2759
165 changed files with 2493 additions and 1739 deletions

View File

@ -21,7 +21,7 @@ export function startProcessInstance(data) {
// 查询流程节点 // 查询流程节点
export function readDeployNotes(deployId) { export function readDeployNotes(deployId) {
return request({ return request({
url: '/wxApi/flowTask/readNotes/'+deployId, url: '/wechat/flowTask/readDeployNotes/'+deployId,
method: 'get' method: 'get'
}) })
} }
@ -136,7 +136,7 @@ export function myFinishedFlowTaskList(data) {
// 根据条件查询所有流申请 // 根据条件查询所有流申请
export function allInstanceList(data) { export function allInstanceList(data) {
return request({ return request({
url: '/wxApi/flowTask/allList', url: '/wechat/flowTask/allList',
method: 'get', method: 'get',
data: data data: data
}) })

View File

@ -33,3 +33,19 @@ export function loginOut() {
'method': 'get' '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'
})
}

View File

@ -1380,6 +1380,7 @@ swiper-item video {
.color_green { .color_green {
color: #1ab400; color: #1ab400;
font-weight: 800;
} }
.color_blue { .color_blue {
@ -1841,3 +1842,12 @@ swiper-item video {
.inspect_list_info_data_2 { .inspect_list_info_data_2 {
width: 100%; 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;
}

View File

@ -8,6 +8,10 @@ component_1.VantComponent({
icon: String, icon: String,
steps: Array, steps: Array,
active: Number, active: Number,
rejectNode:{
type: Number,
value: 100,
},
direction: { direction: {
type: String, type: String,
value: 'horizontal', value: 'horizontal',

View File

@ -2,53 +2,39 @@
<view class="custom-class {{ utils.bem('steps', [direction]) }}"> <view class="custom-class {{ utils.bem('steps', [direction]) }}">
<view class="van-step__wrapper"> <view class="van-step__wrapper">
<view <view wx:for="{{ steps }}" wx:key="index" bindtap="onClick" data-index="{{ index }}" class="{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline" style="{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}">
wx:for="{{ steps }}" <view class="van-step__title" style="{{ index === active ? 'color: #45affb': (index === rejectNode? 'color: #fd6060;font-weight:800':'')}}">
wx:key="index" <view style="{{ index < active ? 'color: ' + activeColor : '' }}">{{ item.text }}</view>
bindtap="onClick"
data-index="{{ index }}"
class="{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline"
style="{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}"
>
<view class="van-step__title" style="{{ index === active ? 'color: ' + activeColor : '' }}">
<view>{{ item.text }}</view>
<view class="desc-class">{{ item.desc }}</view> <view class="desc-class">{{ item.desc }}</view>
</view> </view>
<view class="van-step__circle-container"> <view class="van-step__circle-container">
<block wx:if="{{ index !== active }}"> <block wx:if="{{ index > active }}">
<van-icon <block wx:if="{{ index === rejectNode }}">
wx:if="{{ item.inactiveIcon || inactiveIcon }}" <van-icon color="#fd6060" name="clear" custom-class="van-step__icon" />
color="{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}" </block>
name="{{ item.inactiveIcon || inactiveIcon }}" <block wx:if="{{ index != rejectNode }}">
custom-class="van-step__icon" <van-icon wx:if="{{ item.inactiveIcon || inactiveIcon }}" color="{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}" name="{{ item.inactiveIcon || inactiveIcon }}" custom-class="van-step__icon" />
/> <view wx:else class="van-step__circle" style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}" />
<view </block>
wx:else
class="van-step__circle"
style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}"
/>
</block> </block>
<van-icon wx:else name="{{ index < active ? 'checked': 'checked' }}" style="{{index < active ? 'color:#07c160':'color:#45affb;font-size:30rpx !important;'}}" custom-class="van-step__icon" />
<van-icon wx:else name="{{ item.activeIcon || activeIcon }}" color="{{ activeColor }}" custom-class="van-step__icon" />
</view> </view>
<view <view wx:if="{{ index === rejectNode -1 }}" class="van-step__line" style="background-color:#fd6060" />
wx:if="{{ index !== steps.length - 1 }}" <view wx:if="{{ (index !== steps.length - 1) && index != rejectNode -1 }}" class="van-step__line" style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}" />
class="van-step__line" style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}"
/>
</view> </view>
</view> </view>
</view> </view>
<wxs module="status"> <wxs module="status">
function get(index, active) { function get(index, active) {
if (index < active) { if (index < active) {
return 'finish'; return 'finish';
} else if (index === active) { } else if (index === active) {
return 'process'; return 'process';
}
return 'inactive';
} }
return 'inactive'; module.exports = get;
}
module.exports = get;
</wxs> </wxs>

View File

@ -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)} @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;}

View File

@ -24,7 +24,9 @@ Page({
witnessUserName:"", witnessUserName:"",
checkTime:"", checkTime:"",
laboratoryName:"", laboratoryName:"",
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}] qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
active: 0
}, },
/** /**

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom" "navigationStyle":"custom"

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info "> <view class="inspect_info ">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -18,7 +18,9 @@ Page({
detectionResult:"1", detectionResult:"1",
detectionFileData:[], detectionFileData:[],
fileType:["pdf","png","jpg","jpeg"], fileType:["pdf","png","jpg","jpeg"],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
active: 2
}, },
/** /**

View File

@ -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" "navigationStyle":"custom"
} }

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">

View File

@ -34,7 +34,9 @@ Page({
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}], qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
detectionFileData:[], detectionFileData:[],
fileType:["pdf","png","jpg","jpeg"], fileType:["pdf","png","jpg","jpeg"],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
active: 1
}, },
/** /**

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index", "van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_info "> <view class="inspect_info ">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -28,7 +28,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -2,119 +2,146 @@
const app = getApp() const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id:"", id: "",
infoData:{}, infoData: {},
loadShow:false, loadShow: false,
loginName:"", loginName: "",
showDel:false, showDel: false,
detectionImageList:[], detectionImageList: [],
minDetectionFileImages:[], minDetectionFileImages: [],
detectionFiles:[], detectionFiles: [],
fileUrls:[], fileUrls: [],
activeName:"", activeName: "",
flowRecordList:[], flowRecordList: [],
request:app.globalData.reqUrl request: app.globalData.reqUrl,
}, flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '检测报告'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 100
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let {id} = options let {
//获取缓存数据 id
wx.getStorage({ } = options
key: 'userinfo', //获取缓存数据
success:res=>{ wx.getStorage({
this.setData({ key: 'userinfo',
id, success: res => {
loginName:res.data.loginName this.setData({
}) id,
this.getInfo(); loginName: res.data.loginName
this.getAuditinfo();
}
}) })
}, this.getInfo();
this.getAuditinfo();
}
})
},
/** /**
* 获取安全检查详情信息 * 获取安全检查详情信息
* *
*/ */
getInfo(){ getInfo() {
let {id} = this.data let {
let that = this id
wx.request({ } = this.data
url: app.globalData.reqUrl+'/wechat/projectDetection/info', let that = this
method:"get", wx.request({
data:{ url: app.globalData.reqUrl + '/wechat/projectDetection/info',
id:id method: "get",
}, data: {
success(res){ id: id
res = res.data },
if(res.code == 200){ success(res) {
let imageUrls = []; res = res.data
let minImageUrls = []; if (res.code == 200) {
let fileUrls = []; let state = that.data.active;
let fileNames = []; if (res.data.approveStatus == null) {
//判断附件 state = 2;
if(res.data.detectionFile){ }else if (res.data.approveStatus == "1") {
res.data.detectionFile.split(',').forEach(element => { state = 3;
let _file = element.split('.'); } else if (res.data.approveStatus == "3") {
_file = _file[_file.length-1].toLocaleUpperCase(); state = 2;
//判断附件类型,如果是图片直接展示,非图片则显示附件
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
})
}
}
} }
}) that.setData({
}, active: state
})
/** let imageUrls = [];
* 查询流程日志 let minImageUrls = [];
*/ let fileUrls = [];
getAuditinfo(){ let fileNames = [];
let that = this //判断附件
wx.request({ if (res.data.detectionFile) {
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo', res.data.detectionFile.split(',').forEach(element => {
method:"get", let _file = element.split('.');
data:{ _file = _file[_file.length - 1].toLocaleUpperCase();
fromType:"1", //判断附件类型,如果是图片直接展示,非图片则显示附件
fromId:this.data.id if (_file == "PNG" || _file == "JPG" || _file == "JPEG") {
}, imageUrls.push(that.data.request + element);
success(res){ minImageUrls.push(that.data.request + element + '.min.jpg');
res = res.data } else {
if(res.code == 200){ 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({ 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(){ onDelete() {
//弹出确认 //弹出确认
let that = this let that = this
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '是否确定删除此条数据?', content: '是否确定删除此条数据?',
success: function (sm) { success: function (sm) {
if (sm.confirm) { if (sm.confirm) {
// 用户点击了确定 可以调用了 // 用户点击了确定 可以调用了
that.deleteData(); that.deleteData();
} else if (sm.cancel) { } else if (sm.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
} }
}) })
}, },
deleteData(){ deleteData() {
let {id} = this.data let {
wx.request({ id
url: app.globalData.reqUrl+'/wechat/projectDetection/remove', } = this.data
header: { wx.request({
"Username": this.data.loginName, url: app.globalData.reqUrl + '/wechat/projectDetection/remove',
}, header: {
data:{ "Username": this.data.loginName,
id:id },
}, data: {
method:"get", id: id
success(res){ },
app.toast("删除成功!") method: "get",
wx.redirectTo({ success(res) {
url: `../list/index`, app.toast("删除成功!")
}) wx.redirectTo({
} url: `../list/index`,
}) })
}, }
})
},
//跳转修改页面 //跳转修改页面
onUpdate:function(){ onUpdate: function () {
let id = this.data.id; let id = this.data.id;
wx.redirectTo({ wx.redirectTo({
url: `../edit/index?id=${id}`, url: `../edit/index?id=${id}`,
@ -169,88 +198,88 @@ Page({
}, },
//展示图片 //展示图片
showImg:function(e){ showImg: function (e) {
var that=this; var that = this;
wx.previewImage({ wx.previewImage({
urls: that.data.detectionImageList, urls: that.data.detectionImageList,
current: that.data.detectionImageList[e.currentTarget.dataset.index] current: that.data.detectionImageList[e.currentTarget.dataset.index]
}) })
}, },
downFile:function(e){ downFile: function (e) {
let that = this; let that = this;
wx.downloadFile({ wx.downloadFile({
// 示例 url并非真实存在 // 示例 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) { success: function (res) {
const filePath = res.tempFilePath const filePath = res.tempFilePath
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功')
}, },
fail:function(res) { fail: function (res) {
console.log(res) console.log(res)
} }
}) })
} }
}) })
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!") //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
}, },
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({ wx.redirectTo({
url: '../list/index', url: '../list/index',
}) })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
} }
}) })

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"
}, },

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;"> <view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">

View File

@ -44,7 +44,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -43,7 +43,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -31,7 +31,9 @@ Page({
dataTypeLvl1List:[], dataTypeLvl1List:[],
dataTypeLvl2List:[], dataTypeLvl2List:[],
dataTypeLvl2AllList:[], dataTypeLvl2AllList:[],
list:[{id:1,text:"合格"},{id:2,text:"不合格"}] list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 0
}, },
/** /**

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info"> <view class="inspect_info">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -36,7 +36,9 @@ Page({
dataTypeLvl2List:[], dataTypeLvl2List:[],
dataTypeLvl2AllList:[], dataTypeLvl2AllList:[],
list:[{id:1,text:"合格"},{id:2,text:"不合格"}], list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 1
}, },
/** /**

View File

@ -2,6 +2,7 @@
"usingComponents": { "usingComponents": {
"van-overlay": "@vant/weapp/overlay/index", "van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_info"> <view class="inspect_info">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -34,7 +34,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -2,83 +2,106 @@
const app = getApp() const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id:"", id: "",
infoData:{}, infoData: {},
imageList:[], imageList: [],
minImageList:[], minImageList: [],
loadShow:false, loadShow: false,
loginName:"", loginName: "",
showDel:false, showDel: false,
activeName:"", activeName: "",
flowRecordList:[], flowRecordList: [],
request:app.globalData.reqUrl request: app.globalData.reqUrl,
}, flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 100
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let {id} = options let {
//获取缓存数据 id
wx.getStorage({ } = options
key: 'userinfo', //获取缓存数据
success:res=>{ wx.getStorage({
this.setData({ key: 'userinfo',
id, success: res => {
loginName:res.data.loginName this.setData({
}) id,
this.getInfo(); loginName: res.data.loginName
this.getAuditinfo();
}
}) })
}, this.getInfo();
this.getAuditinfo();
}
})
},
/** /**
* 获取安全检查详情信息 * 获取安全检查详情信息
* *
*/ */
getInfo(){ getInfo() {
let {id} = this.data let {
let that = this id
wx.request({ } = this.data
url: app.globalData.reqUrl+'/wechat/projectchecking/info', let that = this
method:"get", wx.request({
data:{ url: app.globalData.reqUrl + '/wechat/projectchecking/info',
id:id method: "get",
}, data: {
success(res){ id: id
res = res.data },
if(res.code == 200){ success(res) {
let urls = []; res = res.data
let minUrls = []; if (res.code == 200) {
if(res.data.imageUrls){ let state = that.data.active;
res.data.imageUrls.split(',').forEach(element => { if (res.data.approveStatus == "1") {
urls.push(that.data.request+element); state = 2;
minUrls.push(that.data.request+element+'.min.jpg'); } else if (res.data.approveStatus == "3") {
}); state = 1;
}
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
})
}
}
} }
}) 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(){ onDelete() {
//弹出确认 //弹出确认
let that = this let that = this
wx.showModal({ wx.showModal({
@ -86,64 +109,66 @@ Page({
content: '是否确定删除此条数据?', content: '是否确定删除此条数据?',
success: function (sm) { success: function (sm) {
if (sm.confirm) { if (sm.confirm) {
// 用户点击了确定 可以调用了 // 用户点击了确定 可以调用了
that.deleteData(); that.deleteData();
} else if (sm.cancel) { } else if (sm.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
}
} }
}) }
})
}, },
deleteData(){ deleteData() {
let {id} = this.data let {
wx.request({ id
url: app.globalData.reqUrl+'/wechat/projectchecking/remove', } = this.data
header: { wx.request({
"Username": this.data.loginName, url: app.globalData.reqUrl + '/wechat/projectchecking/remove',
}, header: {
data:{ "Username": this.data.loginName,
id:id },
}, data: {
method:"get", id: id
success(res){ },
app.toast("删除成功!") method: "get",
wx.navigateTo({ success(res) {
url: `../list/index`, app.toast("删除成功!")
}) wx.navigateTo({
} url: `../list/index`,
}) })
}
})
}, },
//跳转修改页面 //跳转修改页面
onUpdate:function(){ onUpdate: function () {
let id = this.data.id; let id = this.data.id;
let dataTypeLvl1= this.data.infoData.dataTypeLvl1; let dataTypeLvl1 = this.data.infoData.dataTypeLvl1;
wx.redirectTo({ wx.redirectTo({
url: `../edit/index?id=${id}&dt1=${dataTypeLvl1}`, url: `../edit/index?id=${id}&dt1=${dataTypeLvl1}`,
}) })
}, },
/** /**
* 查询流程日志 * 查询流程日志
*/ */
getAuditinfo(){ getAuditinfo() {
let that = this let that = this
wx.request({ wx.request({
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo', url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
method:"get", method: "get",
data:{ data: {
fromType:"3", fromType: "3",
fromId:this.data.id fromId: this.data.id
}, },
success(res){ success(res) {
res = res.data res = res.data
if(res.code == 200){ if (res.code == 200) {
that.setData({ that.setData({
flowRecordList:res.data flowRecordList: res.data
}) })
}
} }
}) }
})
}, },
// 手风琴 // 手风琴
@ -153,68 +178,68 @@ Page({
}); });
}, },
//展示图片 //展示图片
showImg:function(e){ showImg: function (e) {
var that=this; var that = this;
wx.previewImage({ wx.previewImage({
urls: that.data.imageList, urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index] current: that.data.imageList[e.currentTarget.dataset.index]
}) })
}, },
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.navigateTo({ wx.navigateTo({
url: '../list/index', url: '../list/index',
}) })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
} }
}) })

View File

@ -2,6 +2,7 @@
"usingComponents": { "usingComponents": {
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -1,138 +1,148 @@
<!--pageage/safetyManagement/problemRectification/index.wxml--> <!--pageage/safetyManagement/problemRectification/index.wxml-->
<view class="header_title"> <view class="header_title">
<view class="header_title_row"> <view class="header_title_row">
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view> <view class="header_img" bindtap="returnToPage">
</van-col> <image src="/images/left.png"></image>
<van-col span="15"> </view>
<view class="header_name">举牌验收详情</view> </van-col>
</van-col> <van-col span="15">
</van-row> <view class="header_name">举牌验收详情</view>
</view> </van-col>
</van-row>
</view>
</view> </view>
<view class="max_content"> <view class="max_content">
<view class="inspect_overview_max"> <van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_overview"> <view class="inspect_overview_max">
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;"> <view class="inspect_overview">
<van-collapse value="{{activeName}}" bind:change="onChange"> <view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
<van-collapse-item title="审批日志" name="2"> <van-collapse value="{{activeName}}" bind:change="onChange">
<view class="inspect_list"> <van-collapse-item title="审批日志" name="2">
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index"> <view class="inspect_list">
<view class="inspect_for_bgd"> <view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
<view class="inspect_list_title"> <view class="inspect_for_bgd">
<view class="inspect_list_title_label inspect_list_title_width"> <view class="inspect_list_title">
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view> <view class="inspect_list_title_label inspect_list_title_width">
<view class="module_title module_title_flex inspect_list_title_text"> <view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
<text wx:if="{{item.approveStatus==1}}">提交举牌验收</text> <view class="module_title module_title_flex inspect_list_title_text">
<text wx:if="{{item.approveStatus!=1}}">审批举牌验收</text> <text wx:if="{{item.approveStatus==1}}">提交举牌验收</text>
<text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text> <text wx:if="{{item.approveStatus!=1}}">审批举牌验收</text>
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text> <text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
</view>
</view>
</view>
<view class="inspect_list_info gk_open_con">
<view wx:if="{{item.userName}}">
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
</view>
<view wx:if="{{item.deptName}}">
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
</view>
<view>
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
</view>
<view wx:if="{{item.comment}}">
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="inspect_list_info gk_open_con"> </view>
<view wx:if="{{item.userName}}"><image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text></view> </van-collapse-item>
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view> </van-collapse>
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view> </view>
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view> <view class="module_title module_title_padding">
</view> <view>{{infoData.projectName}}</view>
</view>
<view class="inspect_overview_list_max">
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">单位名称</text></van-col>
<van-col span="18">{{infoData.deptName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">验收图片</text></van-col>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view> </view>
</view> </view>
</view> </van-row>
</van-collapse-item> </view>
</van-collapse> <view class="inspect_overview_list">
</view> <van-row>
<view class="module_title module_title_padding"> <van-col span="6"><text class="color_purple">验收类型</text></van-col>
<view>{{infoData.projectName}}</view> <van-col span="18" class="color_blue">{{infoData.dataTypeLvl1Name}}</van-col>
</view> </van-row>
<view class="inspect_overview_list_max"> </view>
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="6"><text class="color_purple">单位名称</text></van-col> <van-col span="6"><text class="color_purple">类型分类</text></van-col>
<van-col span="18">{{infoData.deptName}}</van-col> <van-col span="18" class="color_blue">{{infoData.dataTypeLvl2Name}}</van-col>
</van-row> </van-row>
</view> </view>
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="6"><text class="color_purple">验收图片</text></van-col> <van-col span="6"><text class="color_purple">质量专员</text></van-col>
<view class="problem_list_info_con in-img-max"> <van-col span="18">{{infoData.qualityUserName}} {{infoData.qualityUser}}</van-col>
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index"> </van-row>
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image> </view>
</view> <view class="inspect_overview_list">
</view> <van-row>
</van-row> <van-col span="6"><text class="color_purple">监理专员</text></van-col>
</view> <van-col span="18">{{infoData.superviseUserName}} {{infoData.superviseUser}}</van-col>
<view class="inspect_overview_list"> </van-row>
<van-row> </view>
<van-col span="6"><text class="color_purple">验收类型</text></van-col> <view class="inspect_overview_list">
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl1Name}}</van-col> <van-row>
</van-row> <van-col span="6"><text class="color_purple">工序部位</text></van-col>
</view> <van-col span="18">{{infoData.checkWorkingPosition}}</van-col>
<view class="inspect_overview_list"> </van-row>
<van-row> </view>
<van-col span="6"><text class="color_purple">类型分类</text></van-col> <view class="inspect_overview_list">
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl2Name}}</van-col> <van-row>
</van-row> <van-col span="6"><text class="color_purple">验收描述</text></van-col>
</view> <van-col span="18">{{infoData.intro}}</van-col>
<view class="inspect_overview_list"> </van-row>
<van-row> </view>
<van-col span="6"><text class="color_purple">质量专员</text></van-col> <view class="inspect_overview_list">
<van-col span="18">{{infoData.qualityUserName}} {{infoData.qualityUser}}</van-col> <van-row>
</van-row> <van-col span="6"><text class="color_purple">验收时间</text></van-col>
</view> <van-col span="18">{{infoData.checkingDate}}</van-col>
<view class="inspect_overview_list"> </van-row>
<van-row> </view>
<van-col span="6"><text class="color_purple">监理专员</text></van-col> <view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
<van-col span="18">{{infoData.superviseUserName}} {{infoData.superviseUser}}</van-col> <van-row>
</van-row> <van-col span="6"><text class="color_purple">验收结果</text></van-col>
</view> <van-col span="18">
<view class="inspect_overview_list"> <text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
<van-row> <text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
<van-col span="6"><text class="color_purple">工序部位</text></van-col> <text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
<van-col span="18">{{infoData.checkWorkingPosition}}</van-col> </van-col>
</van-row> </van-row>
</view> </view>
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="6"><text class="color_purple">验收描述</text></van-col> <van-col span="6"><text class="color_purple">提交时间</text></van-col>
<van-col span="18">{{infoData.intro}}</van-col> <van-col span="18">{{infoData.createTime}}</van-col>
</van-row> </van-row>
</view> </view>
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="6"><text class="color_purple">验收时间</text></van-col> <van-col span="6"><text class="color_purple">提交用户</text></van-col>
<van-col span="18">{{infoData.checkingDate}}</van-col> <van-col span="18">{{infoData.createBy}}</van-col>
</van-row> </van-row>
</view> </view>
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
<van-row>
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
<van-col span="18">
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
</van-col>
</van-row>
</view> </view>
<view class="inspect_overview_list"> </view>
<van-row> </view>
<van-col span="6"><text class="color_purple">提交时间</text></van-col> <view class="problem_submit_to" wx:if="{{showDel}}">
<van-col span="18">{{infoData.createTime}}</van-col> <view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
</van-row> <view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
</view> </view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
<van-col span="18">{{infoData.createBy}}</van-col>
</van-row>
</view>
</view>
</view>
</view>
<view class="problem_submit_to" wx:if="{{showDel}}">
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
</view>
</view> </view>

View File

@ -44,7 +44,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -50,7 +50,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -41,7 +41,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -46,7 +46,7 @@ Page({
let fileDepts = ""; let fileDepts = "";
if(res.data.minRoleId>3){ if(res.data.minRoleId>3){
if(res.data.minRoleId==4){ if(res.data.minRoleId==4){
fileDepts += app.globalData.projectInfoList[0].projectInfoList[0].deptId; fileDepts += app.globalData.projectInfoList[0].deptId;
}else{ }else{
app.globalData.projectInfoList.forEach(pro =>{ app.globalData.projectInfoList.forEach(pro =>{
fileDepts += pro.projectInfoList[0].deptId; fileDepts += pro.projectInfoList[0].deptId;

View File

@ -57,7 +57,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -39,7 +39,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -24,7 +24,9 @@ Page({
showBgd:false, showBgd:false,
rectifierData:[], rectifierData:[],
witnessUser:"", witnessUser:"",
witnessUserName:"" witnessUserName:"",
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 0
}, },
/** /**

View File

@ -6,6 +6,7 @@
"van-picker": "@vant/weapp/picker/index", "van-picker": "@vant/weapp/picker/index",
"van-area": "@vant/weapp/area/index", "van-area": "@vant/weapp/area/index",
"mkl-multi-select": "/components/@mkl/multi-select/index", "mkl-multi-select": "/components/@mkl/multi-select/index",
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom" "navigationStyle":"custom"

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info"> <view class="inspect_info">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -28,7 +28,9 @@ Page({
activeName:"", activeName:"",
flowRecordList:[], flowRecordList:[],
infoData:{}, infoData:{},
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 1
}, },
/** /**

View File

@ -8,6 +8,7 @@
"mkl-multi-select": "/components/@mkl/multi-select/index", "mkl-multi-select": "/components/@mkl/multi-select/index",
"van-overlay": "@vant/weapp/overlay/index", "van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"
}, },
"navigationStyle":"custom" "navigationStyle":"custom"

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_info"> <view class="inspect_info">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -67,7 +67,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -2,139 +2,162 @@
const app = getApp() const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id:"", id: "",
infoData:{}, infoData: {},
imageList:[], imageList: [],
minImageList:[], minImageList: [],
loadShow:false, loadShow: false,
loginName:"", loginName: "",
showDel:false, showDel: false,
signFileNames:[], signFileNames: [],
minSignFileImages:[], minSignFileImages: [],
signFileImages:[], signFileImages: [],
alterationFileNames:[], alterationFileNames: [],
minAlterationFileImages:[], minAlterationFileImages: [],
alterationFileImages:[], alterationFileImages: [],
fileUrls:[], fileUrls: [],
fileUrls2:[], fileUrls2: [],
activeName:"", activeName: "",
flowRecordList:[], flowRecordList: [],
request:app.globalData.reqUrl request: app.globalData.reqUrl,
}, flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 100
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let {id} = options let {
//获取缓存数据 id
wx.getStorage({ } = options
key: 'userinfo', //获取缓存数据
success:res=>{ wx.getStorage({
this.setData({ key: 'userinfo',
id, success: res => {
loginName:res.data.loginName this.setData({
}) id,
this.getInfo(); loginName: res.data.loginName
this.getAuditinfo();
}
}) })
}, this.getInfo();
this.getAuditinfo();
}
})
},
/** /**
* 获取安全检查详情信息 * 获取安全检查详情信息
* *
*/ */
getInfo(){ getInfo() {
let {id} = this.data let {
let that = this id
wx.request({ } = this.data
url: app.globalData.reqUrl+'/wechat/projectMaterialSeal/info', let that = this
method:"get", wx.request({
data:{ url: app.globalData.reqUrl + '/wechat/projectMaterialSeal/info',
id:id method: "get",
}, data: {
success(res){ id: id
res = res.data },
if(res.code == 200){ success(res) {
let urls = []; res = res.data
let minUrls = []; if (res.code == 200) {
if(res.data.imageUrls){ let state = that.data.active;
res.data.imageUrls.split(',').forEach(element => { if (res.data.approveStatus == "1") {
urls.push(that.data.request+element); state = 2;
minUrls.push(that.data.request+element+'.min.jpg'); } else if (res.data.approveStatus == "3") {
}); state = 1;
}
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
})
}
}
} }
}) 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(){ onDelete() {
//弹出确认 //弹出确认
let that = this let that = this
wx.showModal({ wx.showModal({
@ -142,37 +165,39 @@ Page({
content: '是否确定删除此条数据?', content: '是否确定删除此条数据?',
success: function (sm) { success: function (sm) {
if (sm.confirm) { if (sm.confirm) {
// 用户点击了确定 可以调用了 // 用户点击了确定 可以调用了
that.deleteData(); that.deleteData();
} else if (sm.cancel) { } else if (sm.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
}
} }
}) }
})
}, },
deleteData(){ deleteData() {
let {id} = this.data let {
let that = this; id
wx.request({ } = this.data
url: app.globalData.reqUrl+"/wechat/projectMaterialSeal/remove", let that = this;
header: { wx.request({
"Username": this.data.loginName, url: app.globalData.reqUrl + "/wechat/projectMaterialSeal/remove",
}, header: {
data:{ "Username": this.data.loginName,
id:id },
}, data: {
method:"get", id: id
success(res){ },
app.toast("删除成功!") method: "get",
wx.redirectTo({ success(res) {
url: `../list/index` app.toast("删除成功!")
}) wx.redirectTo({
} url: `../list/index`
}) })
}
})
}, },
//跳转修改页面 //跳转修改页面
onUpdate:function(){ onUpdate: function () {
let id = this.data.id; let id = this.data.id;
wx.redirectTo({ wx.redirectTo({
url: `../edit/index?id=${id}`, url: `../edit/index?id=${id}`,
@ -180,26 +205,26 @@ Page({
}, },
/** /**
* 查询流程日志 * 查询流程日志
*/ */
getAuditinfo(){ getAuditinfo() {
let that = this let that = this
wx.request({ wx.request({
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo', url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
method:"get", method: "get",
data:{ data: {
fromType:"4", fromType: "4",
fromId:this.data.id fromId: this.data.id
}, },
success(res){ success(res) {
res = res.data res = res.data
if(res.code == 200){ if (res.code == 200) {
that.setData({ that.setData({
flowRecordList:res.data flowRecordList: res.data
}) })
}
} }
}) }
})
}, },
// 手风琴 // 手风琴
@ -209,130 +234,130 @@ Page({
}); });
}, },
//展示图片 //展示图片
showImg:function(e){ showImg: function (e) {
var that=this; var that = this;
wx.previewImage({ wx.previewImage({
urls: that.data.imageList, urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index] current: that.data.imageList[e.currentTarget.dataset.index]
}) })
}, },
//展示图片 //展示图片
showSignFileImg:function(e){ showSignFileImg: function (e) {
var that=this; var that = this;
wx.previewImage({ wx.previewImage({
urls: that.data.signFileImages, urls: that.data.signFileImages,
current: that.data.signFileImages[e.currentTarget.dataset.index] current: that.data.signFileImages[e.currentTarget.dataset.index]
}) })
}, },
//展示图片 //展示图片
showAlterationFileImg:function(e){ showAlterationFileImg: function (e) {
var that=this; var that = this;
wx.previewImage({ wx.previewImage({
urls: that.data.alterationFileImages, urls: that.data.alterationFileImages,
current: that.data.alterationFileImages[e.currentTarget.dataset.index] current: that.data.alterationFileImages[e.currentTarget.dataset.index]
}) })
}, },
downFile:function(e){ downFile: function (e) {
let idx = e.currentTarget.dataset['index']; let idx = e.currentTarget.dataset['index'];
let that = this; let that = this;
wx.downloadFile({ wx.downloadFile({
// 示例 url并非真实存在 // 示例 url并非真实存在
url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx], url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls[idx],
success: function (res) { success: function (res) {
const filePath = res.tempFilePath const filePath = res.tempFilePath
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功')
}, },
fail:function(res) { fail: function (res) {
console.log(res) console.log(res)
} }
}) })
} }
}) })
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!") //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
}, },
downFile2:function(e){ downFile2: function (e) {
let idx = e.currentTarget.dataset['index']; let idx = e.currentTarget.dataset['index'];
let that = this; let that = this;
wx.downloadFile({ wx.downloadFile({
// 示例 url并非真实存在 // 示例 url并非真实存在
url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls2[idx], url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls2[idx],
success: function (res) { success: function (res) {
const filePath = res.tempFilePath const filePath = res.tempFilePath
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功')
}, },
fail:function(res) { fail: function (res) {
console.log(res) console.log(res)
} }
}) })
} }
}) })
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!") //app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
}, },
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({ wx.redirectTo({
url: '../list/index' url: '../list/index'
}) })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
} }
}) })

View File

@ -2,6 +2,7 @@
"usingComponents": { "usingComponents": {
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;"> <view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">

View File

@ -44,7 +44,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -46,7 +46,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -39,7 +39,9 @@ Page({
id: 2, id: 2,
text: "不合格" 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
}, },
/** /**

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom" "navigationStyle":"custom"

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info "> <view class="inspect_info ">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -27,6 +27,8 @@ Page({
type: "", type: "",
info: "", info: "",
filesData: [], filesData: [],
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 1
}, },
/** /**

View File

@ -2,6 +2,7 @@
"usingComponents": { "usingComponents": {
"van-overlay": "@vant/weapp/overlay/index", "van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"
}, },
"navigationStyle":"custom" "navigationStyle":"custom"

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_info "> <view class="inspect_info ">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -28,7 +28,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -2,141 +2,166 @@
const app = getApp() const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id:"", id: "",
infoData:{}, infoData: {},
loadShow:false, loadShow: false,
loginName:"", loginName: "",
showDel:false, showDel: false,
imageList:[], imageList: [],
minImageList:[], minImageList: [],
activeName:"", activeName: "",
flowRecordList:[], flowRecordList: [],
request:app.globalData.reqUrl request: app.globalData.reqUrl,
}, flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 100
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let {id} = options let {
//获取缓存数据 id
wx.getStorage({ } = options
key: 'userinfo', //获取缓存数据
success:res=>{ wx.getStorage({
this.setData({ key: 'userinfo',
id, success: res => {
loginName:res.data.loginName 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 state = that.data.active;
if (res.data.approveStatus == "1") {
state = 2;
} else if (res.data.approveStatus == "3") {
state = 1;
}
that.setData({
active: state
}) })
this.getInfo(); let urls = [];
this.getAuditinfo(); 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');
});
/**
* 获取安全检查详情信息
*
*/
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
})
}
}
} }
}) that.setData({
}, infoData: res.data,
imageList: urls,
onDelete(){ minImageList: minUrls,
//弹出确认 loadShow: false
let that = this })
wx.showModal({ //判断当前能否删除
title: '提示', if (res.data.createBy == that.data.loginName && res.data.approveStatus != "4") {
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({ 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; let id = this.data.id;
wx.redirectTo({ wx.redirectTo({
url: `../edit/index?id=${id}&measureType=${this.data.infoData.measureType}&measureInfo=${this.data.infoData.measureInfo}`, url: `../edit/index?id=${id}&measureType=${this.data.infoData.measureType}&measureInfo=${this.data.infoData.measureInfo}`,
}) })
}, },
//展示图片 //展示图片
showImg:function(e){ showImg: function (e) {
var that=this; var that = this;
wx.previewImage({ wx.previewImage({
urls: that.data.imageList, urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index] current: that.data.imageList[e.currentTarget.dataset.index]
}) })
}, },
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({ wx.redirectTo({
url: '../list/index', url: '../list/index',
}) })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
} }
}) })

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-collapse": "@vant/weapp/collapse", "van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item" "van-collapse-item": "@vant/weapp/collapse-item"
}, },

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;"> <view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">

View File

@ -44,7 +44,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -46,7 +46,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -6,157 +6,184 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
maxDate:new Date(2088,1,1).getTime(), maxDate: new Date(2088, 1, 1).getTime(),
minDate:new Date().getTime()+(3600*48*1000), minDate: new Date().getTime() + (3600 * 48 * 1000),
projectId:"", projectId: "",
projectName:"", projectName: "",
loginName:"", loginName: "",
userName:"", userName: "",
rectifierData:[], rectifierData: [],
rectifierData2:[], rectifierData2: [],
rectifierData3:[], rectifierData3: [],
imageInfoData:[], imageInfoData: [],
//验收时间 //验收时间
nickedTime:'', nickedTime: '',
loadShow:false, loadShow: false,
lordSent:"", lordSent: "",
lordSentUser:"", lordSentUser: "",
copySend:"", copySend: "",
copySendUser:"", copySendUser: "",
recheckSend:"", recheckSend: "",
recheckSendUser:"", recheckSendUser: "",
workParts:"", workParts: "",
changeInfo:"", changeInfo: "",
dangerType:"1", dangerType: "1",
dangerTypeList:[], dangerTypeList: [],
selectValue:"", selectValue: "",
selectIndex:"", selectIndex: "",
problemType:"1", problemType: "1",
showHis:false, showHis: false,
problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}] problemTypeList: [{
id: "1",
text: "常规检查"
}, {
id: "2",
text: "专项检查"
}],
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 0
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let {projectId,projectName} = options let {
projectId,
projectName
} = options
//获取缓存数据 //获取缓存数据
wx.getStorage({ wx.getStorage({
key: 'userinfo', key: 'userinfo',
success:res=>{ success: res => {
this.setData({ this.setData({
projectId:app.globalData.projectId, projectId: app.globalData.projectId,
projectName:app.globalData.projectName, projectName: app.globalData.projectName,
loginName:res.data.loginName, loginName: res.data.loginName,
userName:res.data.nickName, userName: res.data.nickName,
recheckSend:res.data.nickName, recheckSend: res.data.nickName,
recheckSendUser:res.data.loginName recheckSendUser: res.data.loginName
}) })
this.getAllProjectUserData(); this.getAllProjectUserData();
this.getDangerTypeList(); this.getDangerTypeList();
this.getHisInfo(); this.getHisInfo();
} }
}) })
}, },
//查询项目人员数据 //查询项目人员数据
getAllProjectUserData(){ getAllProjectUserData() {
let that = this let that = this
wx.request({ wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/queryAllProjectUserByParams', url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams',
method:"get", method: "get",
data:{ data: {
projectId:that.data.projectId, projectId: that.data.projectId,
loginName:that.data.loginName loginName: that.data.loginName
}, },
header:{ header: {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
}, },
success(res){ success(res) {
res = res.data res = res.data
if(res.code == 200){ if (res.code == 200) {
that.setData({ that.setData({
rectifierData:res.data, rectifierData: res.data,
rectifierData3:res.data, rectifierData3: res.data,
}) })
} }
} }
}) })
wx.request({ wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/queryAllProjectUserByParams', url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams',
method:"get", method: "get",
data:{ data: {
projectId:that.data.projectId, projectId: that.data.projectId,
loginName:that.data.loginName, loginName: that.data.loginName,
selectMy:'Y' selectMy: 'Y'
}, },
header:{ header: {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
}, },
success(res){ success(res) {
res = res.data res = res.data;
if(res.code == 200){ 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({ that.setData({
rectifierData2:res.data, rectifierData2: res.data,
}) })
} }
} }
}) })
}, },
getHisInfo(){ getHisInfo() {
//这里查询当前登录人上次提交隐患,自动填充整改人,复检人,抄送人 //这里查询当前登录人上次提交隐患,自动填充整改人,复检人,抄送人
let that = this let that = this
wx.request({ wx.request({
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/findLastDataByParams', url: app.globalData.reqUrl + '/wechat/projectProblemmodify/findLastDataByParams',
method:"get", method: "get",
data:{ data: {
projectId:that.data.projectId, projectId: that.data.projectId,
createUser:that.data.loginName, createUser: that.data.loginName,
infoType:1 infoType: 1
}, },
header:{ header: {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
}, },
success(res){ success(res) {
res = res.data res = res.data
if(res.code == 200 && res.data){ if (res.code == 200 && res.data) {
that.setData({ that.setData({
showHis:true, showHis: true,
lordSent:res.data.lordSent, lordSent: res.data.lordSent,
lordSentUser:res.data.lordSentUser, lordSentUser: res.data.lordSentUser,
recheckSend:res.data.recheckSend, recheckSend: res.data.recheckSend,
recheckSendUser:res.data.recheckSendUser, recheckSendUser: res.data.recheckSendUser,
copySend:res.data.copySend, copySend: res.data.copySend,
copySendUser:res.data.copySendUser copySendUser: res.data.copySendUser
}) })
} }
} }
}) })
}, },
getDangerTypeList(){ getDangerTypeList() {
let that = this let that = this
wx.request({ wx.request({
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/queryDangerType', url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryDangerType',
method:"get", method: "get",
data:{ data: {
type:'ssp_zlyhlx' type: 'ssp_zlyhlx'
}, },
header:{ header: {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
}, },
success(res){ success(res) {
res = res.data res = res.data
if(res.code == 200){ if (res.code == 200) {
let list=[]; let list = [];
res.data.forEach(it =>{ res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel}); list.push({
"id": it.dictValue,
"text": it.dictLabel
});
}) })
that.setData({ that.setData({
dangerTypeList:list dangerTypeList: list
}) })
} }
} }
@ -164,7 +191,7 @@ Page({
}, },
//隐患描述 //隐患描述
onInputWorkParts(e){ onInputWorkParts(e) {
let workParts = e.detail.value let workParts = e.detail.value
this.setData({ this.setData({
workParts workParts
@ -172,7 +199,7 @@ Page({
}, },
//整改要求 //整改要求
onInputChangeInfoValue(e){ onInputChangeInfoValue(e) {
let changeInfo = e.detail.value let changeInfo = e.detail.value
this.setData({ this.setData({
changeInfo changeInfo
@ -180,7 +207,7 @@ Page({
}, },
//验收时间 //验收时间
onInputTime(e){ onInputTime(e) {
let nickedTime = e.detail let nickedTime = e.detail
this.setData({ this.setData({
nickedTime nickedTime
@ -188,161 +215,178 @@ Page({
}, },
// list 上传图片 // list 上传图片
onImagesArr(e){ onImagesArr(e) {
var data = this.data.imageInfoData var data = this.data.imageInfoData
data = e.detail data = e.detail
this.setData({ this.setData({
imageInfoData:data imageInfoData: data
}) })
}, },
//添加整改人 //添加整改人
onAddLordSent(e){ onAddLordSent(e) {
if(e.detail.length>0){ if (e.detail.length > 0) {
this.setData({ this.setData({
lordSent:e.detail[0].userName, lordSent: e.detail[0].userName,
lordSentUser:e.detail[0].phoneNumber lordSentUser: e.detail[0].phoneNumber
}) })
} }
}, },
//添加抄送人 //添加抄送人
onAddCopySend(e){ onAddCopySend(e) {
if(e.detail.length>0){ if (e.detail.length > 0) {
let phoneNumbers=""; let phoneNumbers = "";
let userNames=""; let userNames = "";
e.detail.forEach(it =>{ e.detail.forEach(it => {
phoneNumbers+=","+it.phoneNumber; phoneNumbers += "," + it.phoneNumber;
userNames+=","+it.userName; userNames += "," + it.userName;
}); });
this.setData({ this.setData({
copySend:userNames.substring(1), copySend: userNames.substring(1),
copySendUser:phoneNumbers.substring(1) copySendUser: phoneNumbers.substring(1)
}) })
}else{ } else {
this.setData({ this.setData({
copySend:"", copySend: "",
copySendUser:"" copySendUser: ""
}) })
} }
}, },
//添加复检人 //添加复检人
onAddRecheckSend(e){ onAddRecheckSend(e) {
if(e.detail.length>0){ if (e.detail.length > 0) {
this.setData({ this.setData({
recheckSend:e.detail[0].userName, recheckSend: e.detail[0].userName,
recheckSendUser:e.detail[0].phoneNumber recheckSendUser: e.detail[0].phoneNumber
}) })
} }
}, },
//取消页面 //取消页面
cancelSaveView(){ cancelSaveView() {
this.returnToPage() this.returnToPage()
}, },
//保存 //保存
onProblemSubmitSave(){ onProblemSubmitSave() {
this.setData({ this.setData({
loadShow:true loadShow: true
}) })
let that = this 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("数据异常,请刷新页面重试!") app.toast("数据异常,请刷新页面重试!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(imageInfoData.length==0){ if (imageInfoData.length == 0) {
app.toast("请上传隐患现场图片!") app.toast("请上传隐患现场图片!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(problemType==""){ if (problemType == "") {
app.toast("请选择检查类型!") app.toast("请选择检查类型!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(dangerType==""){ if (dangerType == "") {
app.toast("请选择隐患类型!") app.toast("请选择隐患类型!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(workParts==""){ if (workParts == "") {
app.toast("请填写隐患描述!") app.toast("请填写隐患描述!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(changeInfo==""){ if (changeInfo == "") {
app.toast("请填写隐患整改要求!") app.toast("请填写隐患整改要求!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(nickedTime==""){ if (nickedTime == "") {
app.toast("请选择整改截至时间!") app.toast("请选择整改截至时间!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(lordSent==""||lordSentUser==""){ if (lordSent == "" || lordSentUser == "") {
app.toast("请选择整改人!") app.toast("请选择整改人!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(recheckSend==""||recheckSendUser==""){ if (recheckSend == "" || recheckSendUser == "") {
app.toast("请选择复检人!") app.toast("请选择复检人!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
if(copySend==""||copySendUser==""){ if (copySend == "" || copySendUser == "") {
app.toast("请选择抄送人!") app.toast("请选择抄送人!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
let pos = copySend.split(","); let pos = copySend.split(",");
pos.forEach(it =>{ pos.forEach(it => {
if(it==lordSent){ if (it == lordSent) {
app.toast("抄送人中不能包含整改人!") app.toast("抄送人中不能包含整改人!")
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
return; return;
} }
}); });
let fileUrls = []; let fileUrls = [];
imageInfoData.forEach(async (item)=>{ imageInfoData.forEach(async (item) => {
let uploadUrl = app.globalData.uploadUrl+'/common/upload' let uploadUrl = app.globalData.uploadUrl + '/common/upload'
let name = "file" let name = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片 //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
let obj = await that.syncUploadImage(uploadUrl,item,name); let obj = await that.syncUploadImage(uploadUrl, item, name);
fileUrls.push(obj.data.fileName); fileUrls.push(obj.data.fileName);
//验证图片上传完毕 //验证图片上传完毕
if(fileUrls.length == imageInfoData.length){ if (fileUrls.length == imageInfoData.length) {
let params = { let params = {
projectId, projectId,
infoType:"1", infoType: "1",
problemArea:projectName, problemArea: projectName,
problemType, problemType,
workParts, workParts,
changeInfo, changeInfo,
@ -350,95 +394,97 @@ Page({
lordSentUser, lordSentUser,
copySend, copySend,
copySendUser, copySendUser,
checkState:0, checkState: 0,
nickedTime:nickedTime+" 23:59:59", nickedTime: nickedTime + " 23:59:59",
smarkUrl:fileUrls.toString(), smarkUrl: fileUrls.toString(),
createUser:loginName, createUser: loginName,
dangerType, dangerType,
recheckSend, recheckSend,
recheckSendUser recheckSendUser
} }
wx.request({ wx.request({
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/addQuality', url: app.globalData.reqUrl + '/wechat/projectProblemmodify/addQuality',
method:"POST", method: "POST",
data:params, data: params,
header: { header: {
"Username": loginName, "Username": loginName,
"Content-Type": "application/json" "Content-Type": "application/json"
}, },
success(res){ success(res) {
that.setData({ that.setData({
loadShow:false loadShow: false
}) })
res =res.data res = res.data
if(res.code == 200){ if (res.code == 200) {
app.toast("添加成功!") app.toast("添加成功!")
setTimeout(()=>{ setTimeout(() => {
wx.redirectTo({ wx.redirectTo({
url: '../list/index', url: '../list/index',
}) })
},200) }, 200)
} }
} }
}) })
} }
}) })
}, },
/** /**
* 这里考虑上传图片异步问题封装为同步 * 这里考虑上传图片异步问题封装为同步
*/ */
syncUploadImage(url,uploadFile,name) { syncUploadImage(url, uploadFile, name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.uploadFile({ wx.uploadFile({
url, // 上传的服务器接口地址 url, // 上传的服务器接口地址
filePath: uploadFile, filePath: uploadFile,
header: { header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
}, },
name, //上传的所需字段,后端提供 name, //上传的所需字段,后端提供
formData: { user: 'test' }, formData: {
success: (res) => { user: 'test'
// 上传完成操作 },
const data = JSON.parse(res.data) success: (res) => {
resolve({ // 上传完成操作
data: data const data = JSON.parse(res.data)
}) resolve({
}, data: data
fail: (err) => { })
//上传失败修改pedding为reject },
console.log("访问接口失败", err); fail: (err) => {
wx.showToast({ //上传失败修改pedding为reject
title: "网络出错,上传失败", console.log("访问接口失败", err);
icon: 'none', wx.showToast({
duration: 1000 title: "网络出错,上传失败",
}); icon: 'none',
reject(err) duration: 1000
} });
reject(err)
}
}); });
}) })
}, },
//选择检查类型 //选择检查类型
onSelectProblemType(e){ onSelectProblemType(e) {
this.setData({ this.setData({
problemType:e.detail.id problemType: e.detail.id
}) })
}, },
//选择隐患类型 //选择隐患类型
onSelectDangerType(e){ onSelectDangerType(e) {
this.setData({ this.setData({
dangerType:e.detail.id dangerType: e.detail.id
}) })
}, },
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({ wx.redirectTo({
url: '../list/index', url: '../list/index',
}) })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info "> <view class="inspect_info ">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -18,7 +18,9 @@ Page({
minImageList:[], minImageList:[],
auditImageList:[], auditImageList:[],
auditMinImageList:[], auditMinImageList:[],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 3
}, },
/** /**

View File

@ -1,6 +1,9 @@
{ {
"usingComponents": { "usingComponents": {
"van-popup": "@vant/weapp/popup/index", "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" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -1,43 +1,98 @@
<!--pageage/safetyManagement/problemRectification/index.wxml--> <!--pageage/safetyManagement/problemRectification/index.wxml-->
<view class="header_title"> <view class="header_title">
<view class="header_title_row"> <view class="header_title_row">
<van-row> <van-row>
<van-col span="4"> <van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view> <view class="header_img" bindtap="returnToPage">
</van-col> <image src="/images/left.png"></image>
<van-col span="15"> </view>
<view class="header_name">质量隐患复检</view> </van-col>
</van-col> <van-col span="15">
</van-row> <view class="header_name">质量隐患复检</view>
</view> </van-col>
</van-row>
</view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">
<view>{{infoData.problemArea}}</view> <view>{{infoData.problemArea}}</view>
</view> </view>
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
<van-collapse value="{{activeName}}" bind:change="onChange">
<!-- <van-collapse-item title="申请流程" name="1">
<view class="left_manage2" wx:for="{{flowNodes}}" wx:key="index">
<text class="safety_issue_number {{item.state}}">{{item.name}}</text>
</view>
</van-collapse-item> -->
<van-collapse-item title="审批日志" name="2">
<view class="inspect_list">
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
<view class="module_title module_title_flex inspect_list_title_text">{{item.taskName}}{{item.commentResult}}
<text wx:if="{{item.commentResult=='通过'}}" class="timeline_for_state_1 color_green">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='驳回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='退回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
</view>
</view>
</view>
<view class="inspect_list_info gk_open_con">
<view wx:if="{{item.assigneeName}}">
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.assigneeName}}</text>
</view>
<view wx:if="{{item.assigneeName}}">
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
</view>
<view wx:if="{{item.candidate}}">
<image src="/images/s_2.png"></image>候选办理:<text>{{item.candidate}}</text>
</view>
<view wx:if="{{item.deleteReason}}">
<image src="/images/s_18.png"></image>驳回节点:<text>{{item.deleteReason}}</text>
</view>
<view>
<image src="/images/s_6.png"></image>接收时间:<text>{{item.startTime}}</text>
</view>
<view wx:if="{{item.endTime}}">
<image src="/images/lw_8.png"></image>处理时间:<text>{{item.endTime}}</text>
</view>
<view wx:if="{{item.duration}}">
<image src="/images/img_11.png"></image>处理耗时:<text>{{item.duration}}</text>
</view>
<view wx:if="{{item.message}}">
<image src="/images/s_7.png"></image>处理意见:<text>{{item.message}}</text>
</view>
</view>
</view>
</view>
</view>
</van-collapse-item>
</van-collapse>
</view>
<view class="inspect_overview_list_max"> <view class="inspect_overview_list_max">
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="6"><text class="color_purple">隐患图片</text></van-col> <van-col span="6"><text class="color_purple">隐患图片</text></van-col>
<view class="problem_list_info_con in-img-max"> <view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index"> <view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image> <image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view> </view>
</view> </view>
</van-row> </van-row>
</view> </view>
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="6"><text class="color_purple">问题类型</text></van-col> <van-col span="6"><text class="color_purple">问题类型</text></van-col>
<van-col span="18"> <van-col span="18">
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text> <text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text> <text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
</van-col> </van-col>
</van-row> </van-row>
</view> </view>
<view class="inspect_overview_list"> <view class="inspect_overview_list">
<van-row> <van-row>
<van-col span="6"><text class="color_purple">隐患类型</text></van-col> <van-col span="6"><text class="color_purple">隐患类型</text></van-col>
@ -103,56 +158,55 @@
</view> </view>
<view class="inspect_overview" wx:if="{{infoData.checkState==1 || infoData.checkState==4}}"> <view class="inspect_overview" wx:if="{{infoData.checkState==1 || infoData.checkState==4}}">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">
<view>问题整改</view> <view>问题整改</view>
</view>
<view class="inspect_overview_list_max">
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">整改说明</text></van-col>
<van-col span="18">{{auditInfo.opinion}}</van-col>
</van-row>
</view> </view>
<view class="inspect_overview_list_max"> <view class="inspect_overview_list">
<view class="inspect_overview_list"> <van-row>
<van-row> <van-col span="6"><text class="color_purple">整改后图片</text></van-col>
<van-col span="6"><text class="color_purple">整改说明</text></van-col> <view class="problem_list_info_con in-img-max">
<van-col span="18">{{auditInfo.opinion}}</van-col> <view class="in-img-div" wx:for="{{auditMinImageList}}" wx:key="index">
</van-row> <image bindtap='showAuditinfoImg' data-index="{{index}}" src='{{item}}'></image>
</view> </view>
<view class="inspect_overview_list"> </view>
<van-row> </van-row>
<van-col span="6"><text class="color_purple">整改后图片</text></van-col> </view>
<view class="problem_list_info_con in-img-max"> <view class="inspect_overview_list" wx:if="{{infoData.checkState==4}}">
<view class="in-img-div" wx:for="{{auditMinImageList}}" wx:key="index"> <van-row>
<image bindtap='showAuditinfoImg' data-index="{{index}}" src='{{item}}'></image> <van-col span="6"><text class="color_purple">完成时间</text></van-col>
</view> <van-col span="18" class="color_green">{{infoData.nickedTime}}</van-col>
</view> </van-row>
</van-row> </view>
</view> </view>
<view class="inspect_overview_list" wx:if="{{infoData.checkState==4}}">
<van-row>
<van-col span="6"><text class="color_purple">完成时间</text></van-col>
<van-col span="18" class="color_green">{{infoData.nickedTime}}</van-col>
</van-row>
</view>
</view>
</view> </view>
<view class="inspect_overview" wx:if="true"> <view class="inspect_overview" wx:if="true">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">
<view>整改复检意见</view> <view>整改复检意见</view>
</view> </view>
<view class="inspect_overview_list_max"> <view class="inspect_overview_list_max">
<view class="inspect_info_list" > <view class="inspect_info_list">
<view class="inspect_info_content"> <view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写整改复检意见" <textarea class="add_textarea" placeholder="请填写整改复检意见" placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200" />
placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200"/>
</view> </view>
</view> </view>
</view>
</view> </view>
</view>
<view class="problem_submit_to"> <view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="onRejectSave">整改驳回</view> <view class="problem_submit_to_btn" bindtap="onRejectSave">整改驳回</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onPassSave">整改通过</view> <view class="problem_submit_to_btn problem_submit_to_save" bindtap="onPassSave">整改通过</view>
</view> </view>
</view> </view>
<van-overlay show="{{loadShow}}"> <van-overlay show="{{loadShow}}">
<view class="gif"> <view class="gif">
<image src="/../images/loding2.gif"></image> <image src="/../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view> <view>数据加载中!请稍后...</view>
</view> </view>
</van-overlay> </van-overlay>

View File

@ -22,6 +22,8 @@ Page({
], ],
lordSent:"", lordSent:"",
lordSentUser:"", lordSentUser:"",
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 0
}, },
/** /**

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info "> <view class="inspect_info ">
<view class="module_title_2 module_title_flex"> <view class="module_title_2 module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>
@ -47,7 +48,7 @@
</view> </view>
<view class="problem_submit_to"> <view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view> <view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">提交隐患</view> <view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">保存草稿</view>
</view> </view>
</view> </view>

View File

@ -2,221 +2,252 @@
const app = getApp() const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id:"", id: "",
infoData:{}, infoData: {},
loadShow:false, loadShow: false,
auditInfo:{}, auditInfo: {},
loginName:"", loginName: "",
showDel:false, showDel: false,
imageList:[], imageList: [],
minImageList:[], minImageList: [],
auditImageList:[], auditImageList: [],
auditMinImageList:[], auditMinImageList: [],
request:app.globalData.reqUrl request: app.globalData.reqUrl,
}, flowNodes: [{
text: '开始'
/** }, {
* 生命周期函数--监听页面加载 text: '提交隐患'
*/ }, {
onLoad(options) { text: '隐患整改'
let {id} = options }, {
//获取缓存数据 text: '隐患复检'
wx.getStorage({ }, {
key: 'userinfo', text: '结束'
success:res=>{ }],
this.setData({ active: 100
id,
loginName:res.data.loginName
})
this.getInfo();
this.getAuditinfo();
}
})
},
/**
* 获取安全检查详情信息
*
*/
getInfo(){
let {id} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/info',
method:"get",
data:{
id:id
},
success(res){
res = res.data
if(res.code == 200){
let urls = [];
let minUrls = [];
if(res.data.smarkUrl){
res.data.smarkUrl.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.checkState!=4 && res.data.createUser==that.data.loginName){
that.setData({
showDel:true
})
}
}
}
})
},
getAuditinfo(){
let {id} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/queryAuditInfo',
method:"get",
data:{
id:id
},
success(res){
res = res.data
if(res.code == 200 && res.data){
let urls = [];
let minUrls = [];
if(res.data.fileUrls){
res.data.fileUrls.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
}
that.setData({
auditInfo:res.data,
auditImageList:urls,
auditMinImageList:minUrls
})
}
}
})
},
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/projectProblemmodify/removeQuality',
header: {
"Username": this.data.loginName,
},
data:{
id:id
},
method:"get",
success(res){
app.toast("删除成功!")
wx.redirectTo({
url: `../list/index`,
})
}
})
},
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
}, },
//展示图片 /**
showAuditinfoImg:function(e){ * 生命周期函数--监听页面加载
var that=this; */
wx.previewImage({ onLoad(options) {
urls: that.data.auditImageList, let {
current: that.data.auditImageList[e.currentTarget.dataset.index] id
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success: res => {
this.setData({
id,
loginName: res.data.loginName
}) })
}, this.getInfo();
this.getAuditinfo();
}
})
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ /**
* 获取安全检查详情信息
*
*/
getInfo() {
let {
id
} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/info',
method: "get",
data: {
id: id
},
success(res) {
res = res.data
if (res.code == 200) {
let state = that.data.active;
if (res.data.checkState == "0") {
state = 2;
} else if (res.data.checkState == "1") {
state = 3;
} else if (res.data.checkState == "3") {
state = 1;
}
that.setData({
active: state
})
let urls = [];
let minUrls = [];
if (res.data.smarkUrl) {
res.data.smarkUrl.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.checkState != 4 && res.data.createUser == that.data.loginName) {
that.setData({
showDel: true
})
}
}
}
})
},
getAuditinfo() {
let {
id
} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryAuditInfo',
method: "get",
data: {
id: id
},
success(res) {
res = res.data
if (res.code == 200 && res.data) {
let urls = [];
let minUrls = [];
if (res.data.fileUrls) {
res.data.fileUrls.split(',').forEach(element => {
urls.push(that.data.request + element);
minUrls.push(that.data.request + element + '.min.jpg');
});
}
that.setData({
auditInfo: res.data,
auditImageList: urls,
auditMinImageList: minUrls
})
}
}
})
},
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/projectProblemmodify/removeQuality',
header: {
"Username": this.data.loginName,
},
data: {
id: id
},
method: "get",
success(res) {
app.toast("删除成功!")
wx.redirectTo({ wx.redirectTo({
url: '../list/index', url: `../list/index`,
}) })
}, }
})
},
/** //展示图片
* 生命周期函数--监听页面初次渲染完成 showImg: function (e) {
*/ var that = this;
onReady() { wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
}, //展示图片
showAuditinfoImg: function (e) {
var that = this;
wx.previewImage({
urls: that.data.auditImageList,
current: that.data.auditImageList[e.currentTarget.dataset.index]
})
},
/** returnToPage: function () {
* 生命周期函数--监听页面显示 /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
*/ wx.redirectTo({
onShow() { url: '../list/index',
})
},
}, /**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
/** },
* 生命周期函数--监听页面隐藏
*/
onHide() {
}, /**
* 生命周期函数--监听页面显示
*/
onShow() {
/** },
* 生命周期函数--监听页面卸载
*/
onUnload() {
}, /**
* 生命周期函数--监听页面隐藏
*/
onHide() {
/** },
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
}, /**
* 生命周期函数--监听页面卸载
*/
onUnload() {
/** },
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}, /**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
/** },
* 用户点击右上角分享
*/
onShareAppMessage() {
} /**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
}) })

View File

@ -1,5 +1,9 @@
{ {
"usingComponents": {}, "usingComponents": {
"van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item"
},
"navigationStyle":"custom", "navigationStyle":"custom",
"navigationBarTitleText": "质量隐患详情" "navigationBarTitleText": "质量隐患详情"
} }

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">

View File

@ -64,6 +64,76 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
wx.getStorage({
key: 'projectInfoList',
success: res => {
app.globalData.projectInfoList = res.data;
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
} else {
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
} else {
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
//获取缓存数据 //获取缓存数据
wx.getStorage({ wx.getStorage({
key: 'userinfo', key: 'userinfo',

View File

@ -57,19 +57,19 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="../https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view class="inspect_add_to_darft" bindtap="skipAddDarft"> <view class="inspect_add_to_darft" bindtap="skipAddDarft">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/../images/new_add.png"></image> <image src="/images/new_add.png"></image>
<view>草稿</view> <view>草稿</view>
</view> </view>
</view> </view>
<view class="inspect_add_to" bindtap="skipAdd"> <view class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/../images/new_add.png"></image> <image src="/images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -17,7 +17,9 @@ Page({
status:"0", status:"0",
imageList:[], imageList:[],
minImageList:[], minImageList:[],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 2
}, },
/** /**

View File

@ -1,6 +1,9 @@
{ {
"usingComponents": { "usingComponents": {
"van-popup": "@vant/weapp/popup/index", "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" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">

View File

@ -34,7 +34,9 @@ Page({
selectIndex:"", selectIndex:"",
problemType:"1", problemType:"1",
showHis:false, showHis:false,
problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}] problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}],
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 0
}, },
/** /**
@ -100,6 +102,19 @@ Page({
success(res){ success(res){
res = res.data res = res.data
if(res.code == 200){ 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({ that.setData({
rectifierData2:res.data, rectifierData2:res.data,
}); });

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info"> <view class="inspect_info">
<view class="module_title module_title_flex"> <view class="module_title module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>

View File

@ -18,7 +18,9 @@ Page({
minImageList:[], minImageList:[],
auditImageList:[], auditImageList:[],
auditMinImageList:[], auditMinImageList:[],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 3
}, },
/** /**

View File

@ -1,6 +1,9 @@
{ {
"usingComponents": { "usingComponents": {
"van-popup": "@vant/weapp/popup/index", "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" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">

View File

@ -22,6 +22,8 @@ Page({
], ],
lordSent:"", lordSent:"",
lordSentUser:"", lordSentUser:"",
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 0
}, },
/** /**

View File

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info "> <view class="inspect_info ">
<view class="module_title_2 module_title_flex"> <view class="module_title_2 module_title_flex">
<view>{{projectName}}</view> <view>{{projectName}}</view>
@ -47,7 +48,7 @@
</view> </view>
<view class="problem_submit_to"> <view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view> <view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">提交隐患</view> <view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">保存草稿</view>
</view> </view>
</view> </view>

View File

@ -15,7 +15,9 @@ Page({
minImageList:[], minImageList:[],
auditImageList:[], auditImageList:[],
auditMinImageList:[], auditMinImageList:[],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 100
}, },
/** /**
@ -54,6 +56,17 @@ Page({
success(res){ success(res){
res = res.data res = res.data
if(res.code == 200){ if(res.code == 200){
let state = that.data.active;
if (res.data.checkState == "0") {
state = 2;
} else if (res.data.checkState == "1") {
state = 3;
} else if (res.data.checkState == "3") {
state = 1;
}
that.setData({
active: state
})
let urls = []; let urls = [];
let minUrls = []; let minUrls = [];
if(res.data.smarkUrl){ if(res.data.smarkUrl){

View File

@ -1,5 +1,9 @@
{ {
"usingComponents": {}, "usingComponents": {
"van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item"
},
"navigationStyle":"custom", "navigationStyle":"custom",
"navigationBarTitleText": "安全隐患详情" "navigationBarTitleText": "安全隐患详情"
} }

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">

View File

@ -57,6 +57,76 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
wx.getStorage({
key: 'projectInfoList',
success: res => {
app.globalData.projectInfoList = res.data;
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
}
})
} else {
app.globalData.projectInfoList.forEach(item => {
if (item.projectId == options.barProId) {
app.globalData.projectId = item.projectId;
app.globalData.projectName = item.projectName;
}
});
//未查询到项目信息
if (!app.globalData.projectId) {
app.globalData.projectInfoList.push({
projectId: options.barProId,
projectId: options.barProName
});
app.globalData.projectId = options.barProId;
app.globalData.projectName = options.barProName;
}
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
} else {
//从缓存读取项目信息
this.setData({
initData: {
text: app.globalData.projectName,
id: app.globalData.projectId
}
})
}
//获取缓存数据 //获取缓存数据
wx.getStorage({ wx.getStorage({
key: 'userinfo', key: 'userinfo',

View File

@ -56,19 +56,19 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="../https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view class="inspect_add_to_darft" bindtap="skipAddDarft"> <view class="inspect_add_to_darft" bindtap="skipAddDarft">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/../images/new_add.png"></image> <image src="/images/new_add.png"></image>
<view>草稿</view> <view>草稿</view>
</view> </view>
</view> </view>
<view class="inspect_add_to" bindtap="skipAdd"> <view class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/../images/new_add.png"></image> <image src="/images/new_add.png"></image>
<view>新增</view> <view>新增</view>
</view> </view>
</view> </view>

View File

@ -17,7 +17,9 @@ Page({
status:"0", status:"0",
imageList:[], imageList:[],
minImageList:[], minImageList:[],
request:app.globalData.reqUrl request:app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
active: 2
}, },
/** /**

View File

@ -1,6 +1,9 @@
{ {
"usingComponents": { "usingComponents": {
"van-popup": "@vant/weapp/popup/index", "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" "van-overlay": "@vant/weapp/overlay/index"
}, },
"navigationStyle":"custom", "navigationStyle":"custom",

View File

@ -12,6 +12,7 @@
</view> </view>
</view> </view>
<view class="max_content"> <view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
<view class="inspect_overview_max"> <view class="inspect_overview_max">
<view class="inspect_overview"> <view class="inspect_overview">
<view class="module_title module_title_padding"> <view class="module_title module_title_padding">

View File

@ -39,7 +39,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -40,7 +40,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -44,7 +44,8 @@
} }
.van-cell.van-cell--clickable{ .van-cell.van-cell--clickable{
background-color: #2b345b; background-color: #2b345b;
margin-top: 30rpx; margin-top: 5rpx;
margin-bottom: 5rpx;
color: #fff; color: #fff;
border-radius: 15rpx; border-radius: 15rpx;

View File

@ -43,7 +43,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

View File

@ -41,7 +41,7 @@
</view> </view>
<view wx:if="{{listData.length==0}}"> <view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;"> <view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image> <image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>

Some files were not shown because too many files have changed in this diff Show More