提交代码

main
姜玉琦 2023-09-24 23:17:05 +08:00
parent 96eaa19819
commit 92a951339c
87 changed files with 3706 additions and 242 deletions

View File

@ -1,5 +1,6 @@
{
"pages": [
"pages/login2/login",
"pages/login/login",
"pages/gongchengliebiao/gongchengliebiao",
"pages/gengduogongneng/gengduogongneng",
@ -71,6 +72,7 @@
"technical-management/index",
"project_checking/add/index",
"project_checking/list/index",
"project_checking/edit/index",
"project_checking/info/index",
"project_problemmodify/security/list/index",
"project_problemmodify/security/info/index",
@ -93,14 +95,17 @@
"project_special/info/index",
"project_measure/list/index",
"project_measure/add/index",
"project_measure/edit/index",
"project_measure/info/index",
"project_materialSeal/list/index",
"project_materialSeal/add/index",
"project_materialSeal/edit/index",
"project_materialSeal/info/index",
"project_checkDetection/list/index",
"project_checkDetection/add/index",
"project_checkDetection/info/index",
"project_checkDetection/check/index",
"project_checkDetection/edit/index",
"project_insurance/add/index",
"project_insurance/info/index",
"project_insurance/list/index",

View File

@ -1238,6 +1238,7 @@ swiper-item video{
}
.inspect_list_info_data_prop{
padding: 10rpx 0;
word-break: break-all;
}
.color_orange{
color: #fd8401;
@ -1526,7 +1527,17 @@ swiper-item video{
margin-left: -3rpx;
}
.code_label_2{
font-size: 0.6rem;
font-size: 0.8rem;
width: 120rpx;
margin: auto;
text-align: center;
padding: 0.1rem;
border-radius: 0.5rem 0 0.5rem 0;
margin-left: -1rpx;
margin-bottom: 10rpx;
}
.code_label_3{
font-size: 0.8rem;
width: 120rpx;
margin: auto;
text-align: center;
@ -1565,7 +1576,6 @@ swiper-item video{
}
.tabNum{
position: absolute;
right: 10px;
background-color: #f56c6c;
border-radius: 10px;
color: #fff;
@ -1576,7 +1586,8 @@ swiper-item video{
padding: 0 6px;
text-align: center;
white-space: nowrap;
top: 10rpx;
margin-top: -50rpx;
margin-left: -15rpx;
}
.tabNum_active{
position: absolute;
@ -1593,6 +1604,12 @@ swiper-item video{
margin-left: 110rpx;
margin-top: 16rpx;
}
.van-col--18{
word-wrap:break-word;
}
.inspect_list_info_data_2{
width: 100%;
}

View File

@ -42,7 +42,7 @@
selection-start="{{ selectionStart }}"
disable-default-padding="{{ disableDefaultPadding }}"
bindinput="onInput"
bindblur="onBlur"
bindinput="onBlur"
bindfocus="onFocus"
bindconfirm="onConfirm"
bindlinechange="onLineChange"
@ -71,7 +71,7 @@
selection-start="{{ selectionStart }}"
password="{{ password || type === 'password' }}"
bindinput="onInput"
bindblur="onBlur"
bindinput="onBlur"
bindfocus="onFocus"
bindconfirm="onConfirm"
bindkeyboardheightchange="onKeyboardHeightChange"

View File

@ -25,20 +25,20 @@
<view class="inspect_info_list" >
<view class="inspect_info_title">材料名称</view>
<view class="inspect_info_content">
<input placeholder="请填写材料名称" bindblur="onInputMaterialNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">取样数量</view>
<view class="inspect_info_content">
<input placeholder="请填写取样数量" bindblur="onInputSampleNumValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">使用部位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写使用部位"
placeholder-style="color:#6777aa;" bindblur="onInputUsePositionValue" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
@ -63,7 +63,7 @@
<view class="inspect_info_list" >
<view class="inspect_info_title">送检实验室名称</view>
<view class="inspect_info_content">
<input placeholder="请填写实验室名称" bindblur="onInputLaboratoryNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
</view>

View File

@ -244,6 +244,14 @@ Page({
})
},
//跳转修改页面
onUpdate:function(){
let id = this.data.id;
wx.redirectTo({
url: `../edit/index?id=${id}`,
})
},
//展示图片
showImg:function(e){
var that=this;

View File

@ -92,7 +92,7 @@
</view>
<view class="inspect_overview" wx:if="{{infoData.detectionResult==nulll}}">
<view class="safety_inspect_title module_title_flex module_title_padding">
<view>登记取样复试结果</view>
<view>登记取样复试检测报告</view>
</view>
<view class="inspect_info">
<view class="inspect_info_list" wx:if="{{false}}">
@ -112,8 +112,8 @@
</view>
</view>
<view class="problem_submit_to" wx:if="{{showDel}}">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
<view class="problem_submit_to_btn" bindtap="onUpdate">修改</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交结果</view>
</view>
</view>

View File

@ -0,0 +1,522 @@
// pageage/safetyManagement/addSafetyInspect/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
id:"",
maxDate:new Date(2088,1,1).getTime(),
currentDate:new Date().getTime(),
deptId:"",
projectId:"",
projectName:"",
loginName:"",
rectifierData:[],
loadShow:false,
checkTypeList:[],
checkType:"1",
materialName:"",
usePosition:"",
sampleNum:"",
qualifiedFlag:"Y",
witnessUser:"",
witnessUserName:"",
checkTime:"",
laboratoryName:"",
infoData:{},
detectionFiles:"",
fileUrls:"",
fileUrlArray:[],
activeName:"",
flowRecordList:[],
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
detectionFileData:[],
fileType:["pdf","png","jpg","jpeg"],
request:app.globalData.reqUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success:res=>{
this.setData({
id,
projectId:app.globalData.projectId,
projectName:app.globalData.projectName,
deptId:res.data.deptId,
loginName:res.data.loginName,
})
this.getProjectUserData();
this.getTypeList();
this.getInfo();
this.getAuditinfo();
}
})
},
//查询项目人员数据
getProjectUserData(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"4",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
that.setData({
rectifierData:res.data
})
}
}
})
},
getTypeList(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectDetection/queryType',
method:"get",
data:{},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
let list=[];
res.data.forEach(it =>{
list.push({"id":it.dictValue,"text":it.dictLabel});
})
that.setData({
checkTypeList:list
})
}
}
})
},
/**
* 获取安全检查详情信息
*
*/
getInfo(){
let {id} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectDetection/info',
method:"get",
data:{
id:id
},
success(res){
res = res.data
if(res.code == 200){
let fileUrls = [];
let fileNames = [];
let fileUrlArray=[];
//判断附件
if(res.data.detectionFile){
res.data.detectionFile.split(',').forEach(element => {
let it = element.split('/');
fileNames.push(it[it.length-1]);
fileUrls.push(element);
fileUrlArray.push({name:it[it.length-1],path:element});
});
}
that.setData({
infoData:res.data,
detectionFiles:fileNames,
fileUrlArray,
fileUrls,
detectionFileData:fileUrlArray,
checkType:res.data.checkType,
materialName:res.data.materialName,
usePosition:res.data.usePosition,
sampleNum:res.data.sampleNum,
qualifiedFlag:res.data.qualifiedFlag,
witnessUser:res.data.witnessUser,
witnessUserName:res.data.witnessUserName,
checkTime:res.data.checkTime,
laboratoryName:res.data.laboratoryName,
loadShow:false
})
}
}
})
},
/**
* 查询流程日志
*/
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
})
}
}
})
},
fileUpload(options){
let file=options.detail;
this.setData({
detectionFileData: file
});
},
// 手风琴
onChange(event) {
this.setData({
activeName: event.detail,
});
},
//材料名称
onInputMaterialNameValue(e){
let materialName = e.detail.value
this.setData({
materialName
})
},
//使用部位
onInputUsePositionValue(e){
let usePosition = e.detail.value
this.setData({
usePosition
})
},
//取样数量
onInputSampleNumValue(e){
let sampleNum = e.detail.value
this.setData({
sampleNum
})
},
//送检实验室名称
onInputLaboratoryNameValue(e){
let laboratoryName = e.detail.value
this.setData({
laboratoryName
})
},
//验收时间
onInputTime(e){
let checkTime = e.detail
this.setData({
checkTime
})
},
//添加监理专员
onAddSend(e){
if(e.detail.length>0){
let phoneNumbers="";
let userNames="";
e.detail.forEach(it =>{
phoneNumbers+=","+it.phoneNumber;
userNames+=","+it.userName;
});
this.setData({
witnessUserName:userNames.substring(1),
witnessUser:phoneNumbers.substring(1)
})
}else{
this.setData({
witnessUser:"",
witnessUserName:""
})
}
},
//取消页面
cancelSaveView(){
this.returnToPage()
},
//保存
onSubmitSave(){
this.setData({
loadShow:true
})
let that = this
let {id,checkType,
materialName,
usePosition,
sampleNum,
qualifiedFlag,
witnessUser,
witnessUserName,
checkTime,
laboratoryName,loginName,detectionFileData} = that.data;
//数据效验
if(id==""){
app.toast("数据异常,请刷新页面重试!")
that.setData({
loadShow:false
})
return;
}
if(checkType==""){
app.toast("请选择送检类型!")
that.setData({
loadShow:false
})
return;
}
if(materialName==""){
app.toast("请填写材料名称!")
that.setData({
loadShow:false
})
return;
}
if(sampleNum==""){
app.toast("请填写取样数量!")
that.setData({
loadShow:false
})
return;
}
if(usePosition==""){
app.toast("请填写使用部位!")
that.setData({
loadShow:false
})
return;
}
if(qualifiedFlag==""){
app.toast("请选择是否提供合格证!")
that.setData({
loadShow:false
})
return;
}
if(qualifiedFlag==""){
app.toast("请选择是否提供合格证!")
that.setData({
loadShow:false
})
return;
}
if(witnessUser==""||witnessUserName==""){
app.toast("请选择见证人!")
that.setData({
loadShow:false
})
return;
}
if(checkTime==""){
app.toast("请选择送检时间!")
that.setData({
loadShow:false
})
return;
}
if(laboratoryName==""){
app.toast("请填写送检实验室名称!")
that.setData({
loadShow:false
})
return;
}
if(this.data.infoData.detectionFile!=null && detectionFileData.length==0){
app.toast("请上传检测报告!")
that.setData({
loadShow:false
})
return;
}
let path=this.data.infoData.detectionFile;
if(detectionFileData.length>0){
let _fileType = detectionFileData[0].path.split('.');
_fileType = _fileType[_fileType.length-1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if(this.data.fileType.indexOf(_fileType)==-1){
app.toast("检测报告不支持 [ "+_fileType+" ] 格式!")
that.setData({
loadShow:false
});
return;
}
}else{
detectionFileData.push(null);
}
detectionFileData.forEach(async (item)=>{
if(item!=null && item.path.indexOf("/profile/")==-1){
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
let uploadName = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
let obj = await that.syncUploadImage(uploadUrl,item.path,uploadName);
path = obj.data.fileName;
}
let params = {
id,
checkType,
materialName,
usePosition,
sampleNum,
qualifiedFlag,
witnessUser,
witnessUserName,
checkTime:checkTime+":00",
laboratoryName,
updateBy:loginName,
detectionFile:path,
approveStatus:path==null?null:"1"
}
wx.request({
url: app.globalData.reqUrl + '/wechat/projectDetection/edit',
method:"POST",
data:params,
header: {
"Username": loginName,
"Content-Type": "application/json"
},
success(res){
that.setData({
loadShow:false
})
res = res.data
if(res.code == 200){
app.toast("修改成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../list/index',
})
},200)
}
}
})
})
},
/**
* 这里考虑上传图片异步问题封装为同步
*/
syncUploadImage(url,uploadFile,name) {
return new Promise((resolve, reject) => {
wx.uploadFile({
url, // 上传的服务器接口地址
filePath: uploadFile,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
resolve({
data: data
})
},
fail: (err) => {
//上传失败修改pedding为reject
console.log("访问接口失败", err);
wx.showToast({
title: "网络出错,上传失败",
icon: 'none',
duration: 1000
});
reject(err)
}
});
})
},
//选择检测类型
onSelectCheckType(e){
this.setData({
checkType:e.detail.id
})
},
//选择是否提供合格证
onSelectQualifiedFlag(e){
this.setData({
qualified:e.detail.id
})
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../list/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,8 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item"
},
"navigationStyle":"custom"
}

View File

@ -0,0 +1,174 @@
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
</van-col>
<van-col span="15">
<view class="header_name">修改取样复试</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="inspect_info ">
<view class="module_title module_title_flex">
<view>{{projectName}}</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="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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==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>
</van-collapse-item>
</van-collapse>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">送检类型</view>
<view class="inspect_info_content">
<voucher-select columns="{{checkTypeList}}" selectValue="{{infoData.checkType}}" placeholder="请选择送检类型" bindchange="onSelectCheckType" ></voucher-select>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">材料名称</view>
<view class="inspect_info_content">
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" model:value="{{infoData.materialName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">取样数量</view>
<view class="inspect_info_content">
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" model:value="{{infoData.sampleNum}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">使用部位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写使用部位" model:value="{{infoData.usePosition}}"
placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">是否提供合格证</view>
<view class="inspect_info_content">
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" selectValue="{{infoData.qualifiedFlag}}" bindchange="onSelectQualifiedFlag" ></voucher-select>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">监理专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddSend" index="{{0}}" title="请选择监理专员" choose="{{infoData.witnessUserName}}">
</select-group-person>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">送检时间</view>
<view class="inspect_info_content">
<voucher-datetime counts="5" currentDate="{{currentDate}}" placeholder="请选择送检时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkTime}}"></voucher-datetime>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">送检实验室名称</view>
<view class="inspect_info_content">
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" model:value="{{infoData.laboratoryName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
</view>
<view class="inspect_overview" wx:if="{{infoData.detectionFile!=nulll}}">
<view class="safety_inspect_title module_title_flex module_title_padding">
<view>登记取样复试结果</view>
</view>
<view class="inspect_info">
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检测报告
<text style="font-size: small;">[可上传PDF和图片格式]</text>
</view>
<view class="inspect_info_content">
<file-uploader-all bindfiles="fileUpload" limit="{{1}}" fileUrlArray="{{fileUrlArray}}"></file-uploader-all>
</view>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="/images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -0,0 +1,54 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
.van-popup{
background: none !important;
}
.van-image__img{
border-radius: 10rpx !important;
}
.van-collapse.van-hairline--top-bottom:after{
border-width: 0px 0;
}
.van-cell.van-cell--borderless{
background-color: #2b345b;
color: #fff;
margin-top: 30rpx;
border-radius: 5rpx;
}
.van-cell.van-cell--borderless:active{
background-color: #2b345b;
}
.van-collapse-item__title.van-collapse-item__title--expanded:active{
background-color: #2b345b;
}
.van-collapse-item .van-cell:after{
border-bottom: 0;
}
.van-collapse-item.van-hairline--top:after{
border-top-width:0
}
.van-cell.van-cell--clickable{
background-color: #2b345b;
margin-top: 30rpx;
color: #fff;
border-radius: 15rpx;
}
.van-cell.van-cell--clickable:active{
background-color: #2b345b;
}
.van-collapse-item__wrapper .van-collapse-item__content{
background-color: #1e2336;
color:#8ca4ec ;
border-width: 0px 0;
}
.gk_open_con view{
padding: 10rpx 0;
width: 100%;
}
.gk_open_con image{
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
position: relative;
top: 5rpx;
}

View File

@ -84,7 +84,7 @@ Page({
loadShow:false
})
//判断当前能否删除
if(res.data.createBy==that.data.loginName){
if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){
that.setData({
showDel:true
})
@ -160,6 +160,14 @@ Page({
})
},
//跳转修改页面
onUpdate:function(){
let id = this.data.id;
wx.redirectTo({
url: `../edit/index?id=${id}`,
})
},
//展示图片
showImg:function(e){
var that=this;

View File

@ -26,9 +26,8 @@
<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>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==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>
@ -151,12 +150,14 @@
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.detectionResult!=null}}">
<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.detectionResult == 1}}" class="color_green">合格</text>
<text wx:if="{{infoData.detectionResult == 2}}" class="color_orange">不合格</text>
<text wx:if="{{infoData.approveStatus==null}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">送检中</text>
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_yellow" 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>
@ -164,6 +165,7 @@
</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 File

@ -27,7 +27,12 @@ Page({
},
getInfo(e){
let {id,checkState} = e.currentTarget.dataset.set
let {id,checkState,approveStatus,witnessUser} = e.currentTarget.dataset.set
if(approveStatus=="1" && witnessUser==this.data.loginName){
wx.redirectTo({
url: `../../../pages/project_approve/approveCheckDetection/index?id=${id}`
})
}else{
if(checkState=="1"){
wx.redirectTo({
url: `../check/index?id=${id}`,
@ -37,6 +42,7 @@ Page({
url: `../info/index?id=${id}`,
})
}
}
},
/**
@ -71,6 +77,7 @@ Page({
let param = {
"projectId": projectId,
"deptId":deptId,
"nowUserName":this.data.loginName,
"activeName":that.data.activeState
}
wx.request({

View File

@ -24,14 +24,15 @@
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_text">送检时间:{{item.checkTime}}</view>
<view wx:if="{{item.detectionResult==null}}" class="code_label_2 code_label_blueviolet">送检中</view>
<view wx:if="{{item.detectionResult==1}}" class="code_label_2 code_label_green">合格</view>
<view wx:if="{{item.detectionResult==2}}" class="code_label_2 code_label_red">不合格</view>
<view wx:if="{{item.approveStatus==null}}" class="code_label_3 code_label_yellow">送检中</view>
<view wx:if="{{item.approveStatus==1}}" class="code_label_3 code_label_blueviolet">待审批</view>
<view wx:if="{{item.approveStatus==4}}" class="code_label_3 code_label_green">合格</view>
<view wx:if="{{item.approveStatus==3}}" class="code_label_3 code_label_red">不合格</view>
</view>
</view>
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_2">
<view class="inspect_list_info_data_prop color_blue">送检类型:<text>{{item.checkTypeName}}</text></view>
<view class="inspect_list_info_data_prop safety_issue_number color_orange">材料名称:<text>{{item.materialName}}</text></view>
<view class="inspect_list_info_data_prop">使用部位:<text>{{item.usePosition}}</text></view>

View File

@ -14,6 +14,7 @@ Page({
loginName:"",
userName:"",
rectifierData:[],
rectifierData2:[],
imageInfoData:[],
checkingResult:"1",
//验收时间
@ -53,7 +54,7 @@ Page({
getProjectUserData(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/list',
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"4",
@ -72,6 +73,27 @@ Page({
}
}
})
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"2",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
let tempData = []
that.setData({
rectifierData2:res.data,
})
}
}
})
},
//切换验收结果

View File

@ -25,7 +25,7 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">质量专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddQualityUser" data-index="1" choose="{{item.person_responsible}}" title="请选择质量专员" >
<select-group-person rectifierData="{{rectifierData2}}" multiple="{{fales}}" bindselected="onAddQualityUser" data-index="1" choose="{{item.person_responsible}}" title="请选择质量专员" >
</select-group-person>
</view>
</view>
@ -39,14 +39,14 @@
<view class="inspect_info_list" >
<view class="inspect_info_title">工序部位</view>
<view class="inspect_info_content">
<input placeholder="请填写验收工序部位" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="onInputCheckWorkingPositionValue" maxlength="200"/>
<input placeholder="请填写验收工序部位" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="onInputCheckWorkingPositionValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">验收描述</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写验收结果描述"
placeholder-style="color:#6777aa;" bindblur="onInputIntroValue" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputIntroValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">

View File

@ -0,0 +1,440 @@
// pageage/safetyManagement/addSafetyInspect/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
maxDate:new Date(2088,1,1).getTime(),
currentDate:new Date().getTime(),
deptId:"",
projectId:"",
projectName:"",
loginName:"",
userName:"",
rectifierData:[],
rectifierData2:[],
imageInfoData:[],
checkingResult:"1",
//验收时间
checkTime:'',
loadShow:false,
qualityUser:"",
qualityUserName:"",
superviseUser:"",
superviseUserName:"",
checkWorkingPosition:"",
intro:"",
infoData:{},
activeName:"",
flowRecordList:[],
minUrls:[],
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
request:app.globalData.reqUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success:res=>{
this.setData({
id,
projectId:app.globalData.projectId,
projectName:app.globalData.projectName,
deptId:res.data.deptId,
loginName:res.data.loginName,
userName:res.data.nickName
})
this.getProjectUserData();
this.getInfo();
this.getAuditinfo();
}
})
},
//查询项目人员数据
getProjectUserData(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"4",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
let tempData = []
that.setData({
rectifierData:res.data,
})
}
}
})
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"2",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
let tempData = []
that.setData({
rectifierData2:res.data,
})
}
}
})
},
//切换验收结果
onSelectType(e){
this.setData({
checkingResult:e.detail.id
})
},
//工序部位
onInputCheckWorkingPositionValue(e){
let checkWorkingPosition = e.detail.value
this.setData({
checkWorkingPosition
})
},
//验收描述
onInputIntroValue(e){
let intro = e.detail.value
this.setData({
intro
})
},
//验收时间
onInputTime(e){
let checkTime = e.detail
this.setData({
checkTime
})
},
/**
* 获取安全检查详情信息
*
*/
getInfo(){
let {id} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectchecking/info',
method:"get",
data:{
id:id
},
success(res){
res = res.data
if(res.code == 200){
let imageInfoData = [];
if(res.data.imageUrls){
res.data.imageUrls.split(',').forEach(element => {
imageInfoData.push(that.data.request+element+'.min.jpg');
});
}
that.setData({
infoData:res.data,
qualityUser:res.data.qualityUser,
qualityUserName:res.data.qualityUserName,
superviseUser:res.data.superviseUser,
superviseUserName:res.data.superviseUserName,
checkWorkingPosition:res.data.checkWorkingPosition,
intro:res.data.intro,
checkTime:res.data.checkTime,
imageInfoData,
loadShow:false
})
}
}
})
},
/**
* 查询流程日志
*/
getAuditinfo(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
method:"get",
data:{
fromType:"3",
fromId:this.data.id
},
success(res){
res = res.data
if(res.code == 200){
that.setData({
flowRecordList:res.data
})
}
}
})
},
// 手风琴
onChange(event) {
this.setData({
activeName: event.detail,
});
},
// list 上传图片
onImagesArr(e){
var data = this.data.imageInfoData
data = e.detail
this.setData({
imageInfoData:data
})
},
//添加质量专员
onAddQualityUser(e){
if(e.detail.length>0){
this.setData({
qualityUser:e.detail[0].phoneNumber,
qualityUserName:e.detail[0].userName
})
}
},
//添加监理专员
onAddSuperviseUser(e){
if(e.detail.length>0){
this.setData({
superviseUser:e.detail[0].phoneNumber,
superviseUserName:e.detail[0].userName
})
}
},
//取消页面
cancelSaveView(){
this.returnToPage()
},
//保存
onProblemSubmitSave(){
this.setData({
loadShow:true
})
let that = this
let {id,qualityUser,qualityUserName,superviseUser,superviseUserName,checkWorkingPosition,intro,checkTime,imageInfoData,loginName} = that.data;
//数据效验
if(id==""){
app.toast("数据异常,请刷新页面重试!")
that.setData({
loadShow:false
})
return;
}
if(imageInfoData.length==0){
app.toast("请上传举牌验收现场图片!")
that.setData({
loadShow:false
})
return;
}
if(qualityUser==""||qualityUserName==""){
app.toast("请选择质量专员!")
that.setData({
loadShow:false
})
return;
}
if(superviseUser==""||superviseUserName==""){
app.toast("请选择监理专员!")
that.setData({
loadShow:false
})
return;
}
if(checkWorkingPosition==""){
app.toast("请填写验收工序部位!")
that.setData({
loadShow:false
})
return;
}
if(intro==""){
app.toast("请填写验收结果描述!")
that.setData({
loadShow:false
})
return;
}
if(checkTime==""){
app.toast("请选择验收时间!")
that.setData({
loadShow:false
})
return;
}
let fileUrls = [];
imageInfoData.forEach(async (item)=>{
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
let name = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
if(item.indexOf(that.data.request)>-1){
fileUrls.push(item.replace(that.data.request,"").replace(".min.jpg",""));
}else{
let obj = await that.syncUploadImage(uploadUrl,item,name);
fileUrls.push(obj.data.fileName);
}
//验证图片上传完毕
if(fileUrls.length == imageInfoData.length){
let params = {
id,
qualityUser,
qualityUserName,
superviseUser,
superviseUserName,
checkWorkingPosition,
intro,
checkingDate:checkTime,
approveStatus:"1",
updateBy:loginName,
imageUrls:fileUrls.toString()
}
wx.request({
url: app.globalData.reqUrl + '/wechat/projectchecking/edit',
method:"POST",
data:params,
header: {
"Username": loginName,
"Content-Type": "application/json"
},
success(res){
that.setData({
loadShow:false
})
res =res.data
if(res.code == 200){
app.toast("修改成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../list/index',
})
},200)
}
}
})
}
})
},
/**
* 这里考虑上传图片异步问题封装为同步
*/
syncUploadImage(url,uploadFile,name) {
return new Promise((resolve, reject) => {
wx.uploadFile({
url, // 上传的服务器接口地址
filePath: uploadFile,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
resolve({
data: data
})
},
fail: (err) => {
//上传失败修改pedding为reject
console.log("访问接口失败", err);
wx.showToast({
title: "网络出错,上传失败",
icon: 'none',
duration: 1000
});
reject(err)
}
});
})
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../list/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,9 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item"
},
"navigationStyle":"custom",
"navigationBarTitleText": "新增举牌验收"
}

View File

@ -0,0 +1,148 @@
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
</van-col>
<van-col span="15">
<view class="header_name">修改举牌验收</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="inspect_info">
<view class="module_title module_title_flex">
<view>{{projectName}}</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="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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==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>
</van-collapse-item>
</van-collapse>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收图片</view>
<view class="problem_list_info_con">
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">质量专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData2}}" multiple="{{fales}}" bindselected="onAddQualityUser" data-index="1" choose="{{qualityUserName}}" title="请选择质量专员" >
</select-group-person>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">监理专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddSuperviseUser" data-index="2" choose="{{superviseUserName}}" title="请选择监理专员" >
</select-group-person>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">工序部位</view>
<view class="inspect_info_content">
<input placeholder="请填写验收工序部位" placeholder-style="color:#6777aa;" model:value="{{infoData.checkWorkingPosition}}" class="inspect_input_fill_in" bindinput="onInputCheckWorkingPositionValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">验收描述</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写验收结果描述"
model:value="{{infoData.intro}}" placeholder-style="color:#6777aa;" bindinput="onInputIntroValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">验收时间</view>
<view class="inspect_info_content">
<voucher-datetime counts="5" currentDate="{{currentDate}}" placeholder="请选择验收时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkingDate}}"></voucher-datetime>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">保存</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="../../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -0,0 +1,60 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
.van-popup{
background: none !important;
}
.van-image__img{
border-radius: 10rpx !important;
}
.radio_custom_class{
padding: 10rpx 100rpx 10rpx 0;
}
.radio_label_class{
color: #ffffff !important;
}
.van-collapse.van-hairline--top-bottom:after{
border-width: 0px 0;
}
.van-cell.van-cell--borderless{
background-color: #2b345b;
color: #fff;
margin-top: 30rpx;
border-radius: 5rpx;
}
.van-cell.van-cell--borderless:active{
background-color: #2b345b;
}
.van-collapse-item__title.van-collapse-item__title--expanded:active{
background-color: #2b345b;
}
.van-collapse-item .van-cell:after{
border-bottom: 0;
}
.van-collapse-item.van-hairline--top:after{
border-top-width:0
}
.van-cell.van-cell--clickable{
background-color: #2b345b;
margin-top: 30rpx;
color: #fff;
border-radius: 15rpx;
}
.van-cell.van-cell--clickable:active{
background-color: #2b345b;
}
.van-collapse-item__wrapper .van-collapse-item__content{
background-color: #1e2336;
color:#8ca4ec ;
border-width: 0px 0;
}
.gk_open_con view{
padding: 10rpx 0;
width: 100%;
}
.gk_open_con image{
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
position: relative;
top: 5rpx;
}

View File

@ -32,11 +32,11 @@ Page({
loginName:res.data.loginName
})
this.getInfo();
this.getAuditinfo();
}
})
},
/**
* 获取安全检查详情信息
*
@ -68,7 +68,7 @@ Page({
loadShow:false
})
//判断当前能否删除
if(res.data.createBy==that.data.loginName){
if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){
that.setData({
showDel:true
})
@ -114,6 +114,14 @@ Page({
})
},
//跳转修改页面
onUpdate:function(){
let id = this.data.id;
wx.redirectTo({
url: `../edit/index?id=${id}`,
})
},
/**
* 查询流程日志
*/

View File

@ -24,11 +24,10 @@
<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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</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==3}}" class="timeline_for_state_2 color_purple">不合格</text>
</view>
</view>
</view>
@ -94,11 +93,14 @@
<van-col span="18">{{infoData.checkingDate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.checkResult!=null}}">
<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 wx:if="{{infoData.checkResult == '1'}}" span="18" class="color_green">验收合格</van-col>
<van-col wx:if="{{infoData.checkResult == '2'}}" span="18" class="color_orange">验收不合格</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 class="inspect_overview_list">
@ -116,7 +118,9 @@
</view>
</view>
</view>
</view>
<view class="problem_submit_to" wx:if="{{showDel}}">
<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 File

@ -36,10 +36,16 @@ Page({
},
getInfo(e){
let {id} = e.currentTarget.dataset.set
let {id,approveStatus,superviseUser} = e.currentTarget.dataset.set
if(approveStatus=="1" && superviseUser==this.data.loginName){
wx.redirectTo({
url: `../info/index?id=${id}`,
url: `../../../pages/project_approve/approveChecking/index?id=${id}`
})
}else{
wx.redirectTo({
url: `../info/index?id=${id}`
})
}
},
/**
@ -123,7 +129,7 @@ Page({
this.setData({
activeState:nav
});
this.getProjectCheckingData(this.initData.id,this.data.loginName,this.data.deptId,this.data.minRoleId)
this.getProjectCheckingData(this.data.projectId,this.data.loginName,this.data.deptId,this.data.minRoleId)
},
returnToPage: function () {

View File

@ -29,8 +29,9 @@
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_img">
<view wx:if="{{item.checkResult==1}}" class="code_label code_label_green">合格</view>
<view wx:if="{{item.checkResult==2}}" class="code_label code_label_red">不合格</view>
<view wx:if="{{item.approveStatus==1}}" class="code_label_2 code_label_blueviolet">待审批</view>
<view wx:if="{{item.approveStatus==4}}" class="code_label_2 code_label_green">合格</view>
<view wx:if="{{item.approveStatus==3}}" class="code_label_2 code_label_red">不合格</view>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{request+item.mainImage+'.min.jpg'}}"/>
</view>
<view class="inspect_list_info_data">

View File

@ -19,19 +19,19 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">劳务人员</view>
<view class="inspect_info_content">
<input placeholder="请填写劳务人员" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="servicePersonnelAction" maxlength="20" value="{{servicePersonnel}}"/>
<input placeholder="请填写劳务人员" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="servicePersonnelAction" maxlength="20" value="{{servicePersonnel}}"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">监理人员</view>
<view class="inspect_info_content">
<input placeholder="请填写监理人员" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="supervisorPersonnelAction" maxlength="20" value="{{supervisorPersonnel}}"/>
<input placeholder="请填写监理人员" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="supervisorPersonnelAction" maxlength="20" value="{{supervisorPersonnel}}"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">总包人员</view>
<view class="inspect_info_content">
<input placeholder="请填写总包人员" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="contractorPersonnelAction" maxlength="20" value="{{contractorPersonnel}}"/>
<input placeholder="请填写总包人员" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="contractorPersonnelAction" maxlength="20" value="{{contractorPersonnel}}"/>
</view>
</view>
</view>

View File

@ -25,13 +25,13 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险公司</view>
<view class="inspect_info_content">
<input placeholder="请填写保险公司" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="companyNameAction" maxlength="20" value="{{phoneNumber}}"/>
<input placeholder="请填写保险公司" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="companyNameAction" maxlength="20" value="{{phoneNumber}}"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险单号</view>
<view class="inspect_info_content">
<input placeholder="请填写保险单号(可不填)" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="insuranceNumberAction" maxlength="50"/>
<input placeholder="请填写保险单号(可不填)" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="insuranceNumberAction" maxlength="50"/>
</view>
</view>
<view class="inspect_info_list" style="width: 100%;">

View File

@ -42,6 +42,7 @@ Page({
deptId:res.data.deptId,
loginName:res.data.loginName
})
this.getProjectUserData();
}
})
},

View File

@ -25,28 +25,28 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样名称</view>
<view class="inspect_info_content">
<input placeholder="请填写封样名称" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="materialNameAction" maxlength="30"/>
<input placeholder="请填写封样名称" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="materialNameAction" maxlength="30"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">使用部位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写使用部位"
placeholder-style="color:#6777aa;" maxlength="800" bindblur="usePositionAction"/>
placeholder-style="color:#6777aa;" maxlength="800" bindinput="usePositionAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">合同指定品牌</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写合同指定品牌"
placeholder-style="color:#6777aa;" maxlength="800" bindblur="contractBrandAction"/>
placeholder-style="color:#6777aa;" maxlength="800" bindinput="contractBrandAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">拟用品牌</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写拟用品牌"
placeholder-style="color:#6777aa;" maxlength="800" bindblur="useBrandAction"/>
placeholder-style="color:#6777aa;" maxlength="800" bindinput="useBrandAction"/>
</view>
</view>
<view class="inspect_info_list">

View File

@ -0,0 +1,512 @@
// pageage/safetyManagement/addSafetyInspect/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
id:"",
maxDate:new Date(2088,1,1).getTime(),
currentDate:new Date().getTime(),
projectId:"",
projectName:"",
loginName:"",
imageInfoData:[],
signFileData:[],
alterationFileData:[],
limit:1,
showBgd:false,
rectifierData:[],
materialName:"",
usePosition:"",
contractBrand:"",
useBrand:"",
sealDate:"",
witnessUser:"",
witnessUserName:"",
activeName:"",
flowRecordList:[],
infoData:{},
request:app.globalData.reqUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success:res=>{
this.setData({
id,
projectId:app.globalData.projectId,
projectName:app.globalData.projectName,
deptId:res.data.deptId,
loginName:res.data.loginName
})
this.getInfo()
this.getAuditinfo();
this.getProjectUserData();
}
})
},
// list 上传图片
onImagesArr(e){
var data = this.data.imageInfoData;
data = e.detail
this.setData({
imageInfoData:data
})
},
onImagesArrSignFiles(e){
var data = this.data.signFileData;
data = e.detail
this.setData({
signFileData:data
})
},
onImagesArrAlterationFiles(e){
var data = this.data.alterationFileData;
data = e.detail
this.setData({
alterationFileData:data
})
},
//添加监理专员
onAddSend(e){
if(e.detail.length>0){
let phoneNumbers="";
let userNames="";
e.detail.forEach(it =>{
phoneNumbers+=","+it.phoneNumber;
userNames+=","+it.userName;
});
this.setData({
"infoData.witnessUserName":userNames.substring(1),
"infoData.witnessUser":phoneNumbers.substring(1)
})
}else{
this.setData({
"infoData.witnessUser":"",
"infoData.witnessUserName":""
})
}
},
//取消页面
cancelSaveView(){
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../list/index'
})
},
/**
* 获取安全检查详情信息
*
*/
getInfo(){
let {id} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectMaterialSeal/info',
method:"get",
data:{
id:id
},
success(res){
res = res.data
if(res.code == 200){
let imageInfoData = [];
if(res.data.imageUrls){
res.data.imageUrls.split(',').forEach(element => {
imageInfoData.push(that.data.request+element+'.min.jpg');
});
}
let signFileData = [];
//判断附件
if(res.data.signFiles){
res.data.signFiles.split(',').forEach(element => {
let type = element.split('.');
type = type[type.length-1].toUpperCase();
if(type=="PDF"){
app.toast("小程序不支持修改PDF格式的会签单请前往PC后台修改!");
setTimeout(()=>{
wx.redirectTo({
url: '../list/index'
})
},200)
}
//let it = element.split('/');
//signFileData.push({name:it[it.length-1],path:element});
signFileData.push(that.data.request+element+'.min.jpg');
});
}
let alterationFileData = [];
//判断附件
if(res.data.alterationFiles){
res.data.alterationFiles.split(',').forEach(element => {
let type = element.split('.');
type = type[type.length-1].toUpperCase();
if(type=="PDF"){
app.toast("小程序不支持修改PDF格式的变更单请前往PC后台修改!");
setTimeout(()=>{
wx.redirectTo({
url: '../list/index'
})
},200)
}
//let it = element.split('/');
//alterationFileData.push({name:it[it.length-1],path:element});
alterationFileData.push(that.data.request+element+'.min.jpg');
});
}
that.setData({
infoData:res.data,
signFileData,
alterationFileData,
imageInfoData,
loadShow:false
})
that.showBgdLabel(res.data);
}
}
})
},
/**
* 查询流程日志
*/
getAuditinfo(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
method:"get",
data:{
fromType:"4",
fromId:this.data.id
},
success(res){
res = res.data
if(res.code == 200){
that.setData({
flowRecordList:res.data
})
}
}
})
},
// 手风琴
onChange(event) {
this.setData({
activeName: event.detail,
});
},
//保存
onSave(){
this.setData({
loadShow:true
})
let that = this
let {id,loginName,imageInfoData,signFileData,alterationFileData,infoData} = that.data;
//数据效验
if(id==""){
app.toast("数据异常,请刷新页面重试!")
that.setData({
loadShow:false
})
return;
}
if(imageInfoData.length==0){
app.toast("请上传封样现场图片!")
that.setData({
loadShow:false
})
return;
}
if(infoData.materialName==""){
app.toast("请填写封样名称!")
that.setData({
loadShow:false
})
return;
}
if(infoData.usePosition==""){
app.toast("请填写使用部位!")
that.setData({
loadShow:false
})
return;
}
if(infoData.contractBrand==""){
app.toast("请填写合同指定品牌!")
that.setData({
loadShow:false
})
return;
}
if(infoData.useBrand==""){
app.toast("请填写拟用品牌!")
that.setData({
loadShow:false
})
return;
}
if(infoData.sealDate==""){
app.toast("请选择封样时间!")
that.setData({
loadShow:false
})
return;
}
if(infoData.witnessUser==""||infoData.witnessUserName==""){
app.toast("请选择监理专员!")
that.setData({
loadShow:false
})
return;
}
if(signFileData.length==0){
app.toast("请上传会签单照片!")
that.setData({
loadShow:false
});
return;
}
if(infoData.contractBrand.indexOf(infoData.useBrand)==-1 && alterationFileData.length==0){
app.toast("请上传变更单照片!")
that.setData({
loadShow:false
});
return;
}
let fileUrls = [];
imageInfoData.forEach(async (item)=>{
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
let name = "file"
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
if(item.indexOf(that.data.request)>-1){
fileUrls.push(item.replace(that.data.request,"").replace(".min.jpg",""));
}else{
let obj = await that.syncUploadImage(uploadUrl,item,name);
fileUrls.push(obj.data.fileName);
}
//验证图片上传完毕
if(fileUrls.length == imageInfoData.length){
let signFilePath="";
if(signFileData[0].indexOf(that.data.request)>-1){
signFilePath = signFileData[0].replace(that.data.request,"").replace(".min.jpg","");
}else{
//上传会签单
let signFile = await that.syncUploadImage(uploadUrl,signFileData[0],name);
signFilePath = signFile.data.fileName;
}
//上传变更单
let alterationFilePath = "";
if(alterationFileData.length>0){
if(alterationFileData[0].indexOf(that.data.request)>-1){
alterationFilePath = alterationFileData[0].replace(that.data.request,"").replace(".min.jpg","");
}else{
//上传会签单
let alterationFile = await that.syncUploadImage(uploadUrl,alterationFileData[0],name);
alterationFilePath = alterationFile.data.fileName;
}
}
let params = {
id,
imageUrls:fileUrls.toString(),
materialName:infoData.materialName,
usePosition:infoData.usePosition,
contractBrand:infoData.contractBrand,
useBrand:infoData.useBrand,
sealDate:infoData.sealDate+":00",
witnessUser:infoData.witnessUser,
witnessUserName:infoData.witnessUserName,
signFiles:signFilePath,
alterationFiles:alterationFilePath,
approveStatus:"1",
updateBy:loginName
}
wx.request({
url: app.globalData.reqUrl + "/wechat/projectMaterialSeal/edit",
method:"POST",
data:params,
header: {
"Username": loginName,
"Content-Type": "application/json"
},
success(res){
that.setData({
loadShow:false
})
res = res.data
if(res.code == 200){
app.toast("修改成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../list/index'
})
},200)
}
}
})
}
})
},
/**
* 这里考虑上传图片异步问题封装为同步
*/
syncUploadImage(url,uploadFile,name) {
return new Promise((resolve, reject) => {
wx.uploadFile({
url, // 上传的服务器接口地址
filePath: uploadFile,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
resolve({
data: data
})
},
fail: (err) => {
//上传失败修改pedding为reject
console.log("访问接口失败", err);
wx.showToast({
title: "网络出错,上传失败",
icon: 'none',
duration: 1000
});
reject(err)
}
});
})
},
materialNameAction: function (options) {
this.data.infoData.materialName = options.detail.value;
},
usePositionAction: function (options) {
this.data.infoData.usePosition = options.detail.value
},
contractBrandAction: function (options) {
this.data.infoData.contractBrand = options.detail.value;
this.showBgdLabel(this.data.infoData);
},
useBrandAction: function (options) {
this.data.infoData.useBrand = options.detail.value;
this.showBgdLabel(this.data.infoData);
},
//演练训练时间
onInputTime(e){
let sealDate = e.detail
this.setData({
"infoData.sealDate":sealDate
})
},
//查询项目人员数据
getProjectUserData(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"4",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
that.setData({
rectifierData:res.data
})
}
}
})
},
showBgdLabel(data){
if(data.contractBrand!="" && data.useBrand!="" && data.contractBrand.indexOf(data.useBrand)==-1){
this.setData({
showBgd:true
})
}else{
this.setData({
showBgd:false
})
}
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../list/index'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,14 @@
{
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-popup": "@vant/weapp/popup",
"van-picker": "@vant/weapp/picker/index",
"van-area": "@vant/weapp/area/index",
"mkl-multi-select": "/components/@mkl/multi-select/index",
"van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item"
},
"navigationStyle":"custom"
}

View File

@ -0,0 +1,166 @@
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
</van-col>
<van-col span="15">
<view class="header_name">修改材料封样</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="inspect_info">
<view class="module_title module_title_flex">
<view>{{projectName}}</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="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">
<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==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>
</van-collapse-item>
</van-collapse>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样图片</view>
<view class="problem_list_info_con">
<file-uploader bindimages="onImagesArr" data-index="{{0}}" fileUrlArray="{{imageInfoData}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样名称</view>
<view class="inspect_info_content">
<input placeholder="请填写封样名称" placeholder-style="color:#6777aa;" model:value="{{infoData.materialName}}" class="inspect_input_fill_in" bindinput="materialNameAction" maxlength="30"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">使用部位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写使用部位"
model:value="{{infoData.usePosition}}" placeholder-style="color:#6777aa;" maxlength="800" bindinput="usePositionAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">合同指定品牌</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写合同指定品牌"
model:value="{{infoData.contractBrand}}" placeholder-style="color:#6777aa;" maxlength="800" bindinput="contractBrandAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">拟用品牌</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写拟用品牌"
model:value="{{infoData.useBrand}}" placeholder-style="color:#6777aa;" maxlength="800" bindinput="useBrandAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样时间</view>
<view class="inspect_info_content">
<voucher-datetime counts="5" placeholder="请选择封样时间" maxDate="{{maxDate}}" currentDate="{{currentDate}}" time="{{infoData.sealDate}}" bindchange="onInputTime"></voucher-datetime>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">监理专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddSend" index="{{0}}" title="请选择监理专员" choose="{{infoData.witnessUserName}}">
</select-group-person>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">会签单图片</view>
<view class="problem_list_info_con">
<file-uploader bindimages="onImagesArrSignFiles" data-index="{{1}}" limit="{{1}}" fileUrlArray="{{signFileData}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list" wx:if="{{showBgd}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">变更单图片</view>
<view class="problem_list_info_con">
<file-uploader bindimages="onImagesArrAlterationFiles" data-index="{{2}}" limit="{{1}}" fileUrlArray="{{alterationFileData}}"></file-uploader>
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">保存</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="../../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -0,0 +1,93 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
.van-popup{
background: none !important;
}
.van-image__img{
border-radius: 10rpx !important;
}
.radio_custom_class{
padding: 10rpx 100rpx 10rpx 0;
}
.radio_label_class{
color: #ffffff !important;
}
.max_tab_name{
padding: 0 40rpx;
font-size:30rpx;
height: 460rpx;
overflow: auto;
margin-top: 20rpx;
text-align: center;
}
.van-popup.van-popup--bottom{
background: #232a44;
}
.van-popup {
background-color: var(--popup-background-color,#232a44) !important;
}
.font_color{
padding: 15rpx 0;
color: #157dd2;
}
.active{
font-size:30rpx;
font-weight: 600;
color: #14feff
}
.option_list_title{
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
}
.option_list_title_btn{
color: #1989fa;
font-size: 30rpx;
}
.van-collapse.van-hairline--top-bottom:after{
border-width: 0px 0;
}
.van-cell.van-cell--borderless{
background-color: #2b345b;
color: #fff;
margin-top: 30rpx;
border-radius: 5rpx;
}
.van-cell.van-cell--borderless:active{
background-color: #2b345b;
}
.van-collapse-item__title.van-collapse-item__title--expanded:active{
background-color: #2b345b;
}
.van-collapse-item .van-cell:after{
border-bottom: 0;
}
.van-collapse-item.van-hairline--top:after{
border-top-width:0
}
.van-cell.van-cell--clickable{
background-color: #2b345b;
margin-top: 30rpx;
color: #fff;
border-radius: 15rpx;
}
.van-cell.van-cell--clickable:active{
background-color: #2b345b;
}
.van-collapse-item__wrapper .van-collapse-item__content{
background-color: #1e2336;
color:#8ca4ec ;
border-width: 0px 0;
}
.gk_open_con view{
padding: 10rpx 0;
width: 100%;
}
.gk_open_con image{
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
position: relative;
top: 5rpx;
}

View File

@ -40,11 +40,11 @@ Page({
loginName:res.data.loginName
})
this.getInfo();
this.getAuditinfo();
}
})
},
/**
* 获取安全检查详情信息
*
@ -124,7 +124,7 @@ Page({
loadShow:false
})
//判断当前能否删除
if(res.data.createBy==that.data.loginName){
if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){
that.setData({
showDel:true
})
@ -171,6 +171,14 @@ Page({
})
},
//跳转修改页面
onUpdate:function(){
let id = this.data.id;
wx.redirectTo({
url: `../edit/index?id=${id}`,
})
},
/**
* 查询流程日志
*/

View File

@ -24,11 +24,10 @@
<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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</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==3}}" class="timeline_for_state_2 color_purple">不合格</text>
</view>
</view>
</view>
@ -123,12 +122,13 @@
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.materialResult!=null}}">
<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.materialResult == 1}}" class="color_green">合格</text>
<text wx:if="{{infoData.materialResult == 2}}" class="color_orange">不合格</text>
<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>
@ -157,6 +157,7 @@
</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 File

@ -25,10 +25,16 @@ Page({
},
getInfo(e){
let {id} = e.currentTarget.dataset.set
let {id,approveStatus,witnessUser} = e.currentTarget.dataset.set
if(approveStatus=="1" && witnessUser==this.data.loginName){
wx.redirectTo({
url: `../../../pages/project_approve/approveMaterialSeal/index?id=${id}`
})
}else{
wx.redirectTo({
url: `../info/index?id=${id}`
})
}
},
/**
@ -63,6 +69,7 @@ Page({
let param = {
"deptId":deptId,
"projectId": projectId,
"nowUserName":this.data.loginName,
"activeName": this.data.activeState,
}
this.queryCount(param);
@ -109,7 +116,7 @@ Page({
this.setData({
activeState:nav
});
this.getListData(this.initData.id,this.data.deptId,this.data.minRoleId);
this.getListData(this.data.projectId,this.data.deptId,this.data.minRoleId);
},
returnToPage: function () {

View File

@ -29,6 +29,9 @@
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_img">
<view wx:if="{{item.approveStatus==1}}" class="code_label_2 code_label_blueviolet">待审批</view>
<view wx:if="{{item.approveStatus==4}}" class="code_label_2 code_label_green">合格</view>
<view wx:if="{{item.approveStatus==3}}" class="code_label_2 code_label_red">不合格</view>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{request+item.mainImage+'.min.jpg'}}"/>
</view>
<view class="inspect_list_info_data">

View File

@ -13,6 +13,7 @@ Page({
projectName:"",
loginName:"",
rectifierData:[],
rectifierData2:[],
imageInfoData:[],
loadShow:false,
measureType:"1",
@ -57,7 +58,7 @@ Page({
getProjectUserData(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/list',
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"4",
@ -75,6 +76,26 @@ Page({
}
}
})
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"2",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
that.setData({
rectifierData2:res.data,
})
}
}
})
},
getMeasureTypeList(){

View File

@ -38,21 +38,21 @@
<view class="inspect_info_title">测量部位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写测量部位"
placeholder-style="color:#6777aa;" bindblur="onInputMeasurePosition" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputMeasurePosition" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">测量点位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写测量点位"
placeholder-style="color:#6777aa;" bindblur="onInputMeasurePointPosition" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputMeasurePointPosition" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">质量专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddQualityUser" index="{{0}}" title="请选择质量专员" >
<select-group-person rectifierData="{{rectifierData2}}" multiple="{{fales}}" bindselected="onAddQualityUser" index="{{0}}" title="请选择质量专员" >
</select-group-person>
</view>
</view>

View File

@ -0,0 +1,500 @@
// pageage/safetyManagement/addSafetyInspect/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
maxDate:new Date(2088,1,1).getTime(),
currentDate:new Date().getTime(),
id:"",
projectId:"",
projectName:"",
loginName:"",
rectifierData:[],
rectifierData2:[],
imageInfoData:[],
loadShow:false,
measureTypeList:[],
measureInfoTypeList:[],
activeName:"",
flowRecordList:[],
request:app.globalData.reqUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success:res=>{
this.setData({
id,
projectId:app.globalData.projectId,
projectName:app.globalData.projectName,
loginName:res.data.loginName
})
this.getMeasureTypeList();
this.getMeasureInfoTypeList();
this.getProjectUserData();
this.getInfo();
this.getAuditinfo();
}
})
},
//查询项目人员数据
getProjectUserData(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"4",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
that.setData({
rectifierData:res.data,
})
}
}
})
wx.request({
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
method:"get",
data:{
unitType:"2",
projectId:that.data.projectId
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
that.setData({
rectifierData2:res.data,
})
}
}
})
},
getMeasureTypeList(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectMeasure/queryDictType',
method:"get",
data:{
type:'project_measure_type'
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
let list=[];
res.data.forEach(it =>{
list.push({"id":it.dictValue,"text":it.dictLabel});
})
that.setData({
measureTypeList:list
})
}
}
})
},
getMeasureInfoTypeList(){
let that = this
wx.request({
url: app.globalData.reqUrl+'/wechat/projectMeasure/queryDictType',
method:"get",
data:{
type:'project_measure_info_type'
},
header:{
'content-type': 'application/x-www-form-urlencoded'
},
success(res){
res = res.data
if(res.code == 200){
let list=[];
res.data.forEach(it =>{
list.push({"id":it.dictValue,"text":it.dictLabel});
})
that.setData({
measureInfoTypeList:list
})
}
}
})
},
/**
* 获取安全检查详情信息
*
*/
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 imageInfoData = [];
if(res.data.imageUrls){
res.data.imageUrls.split(',').forEach(element => {
imageInfoData.push(that.data.request+element+'.min.jpg');
});
}
that.setData({
infoData:res.data,
imageInfoData,
loadShow:false
})
}
}
})
},
/**
* 查询流程日志
*/
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
})
}
}
})
},
// 手风琴
onChange(event) {
this.setData({
activeName: event.detail,
});
},
//测量部位
onInputMeasurePosition(e){
this.setData({
"infoData.measurePosition":e.detail.value
})
},
//测量点位
onInputMeasurePointPosition(e){
this.setData({
"infoData.measurePointPosition":e.detail.value
})
},
//验收时间
onInputTime(e){
this.setData({
"infoData.measureTime":e.detail.value
})
},
// list 上传图片
onImagesArr(e){
var data = this.data.imageInfoData
data = e.detail
this.setData({
imageInfoData:data
})
},
//添加质量专员
onAddQualityUser(e){
if(e.detail.length>0){
this.setData({
"infoData.qualityUser":e.detail[0].phoneNumber,
"infoData.qualityUserName":e.detail[0].userName
})
}
},
//添加监理专员
onAddSuperviseUser(e){
if(e.detail.length>0){
this.setData({
"infoData.superviseUser":e.detail[0].phoneNumber,
"infoData.superviseUserName":e.detail[0].userName
})
}
},
//取消页面
cancelSaveView(){
this.returnToPage()
},
//保存
onSave(){
this.setData({
loadShow:true
})
let that = this
let {id,loginName,imageInfoData,infoData} = that.data;
//数据效验
if(id==""){
app.toast("数据异常,请刷新页面重试!")
that.setData({
loadShow:false
})
return;
}
if(imageInfoData.length==0){
app.toast("请上传测量现场图片!")
that.setData({
loadShow:false
})
return;
}
if(infoData.measureType==""){
app.toast("请选择测量类型!")
that.setData({
loadShow:false
})
return;
}
if(infoData.measureInfo==""){
app.toast("请选择测量内容!")
that.setData({
loadShow:false
})
return;
}
if(infoData.measurePosition==""){
app.toast("请填写测量部位!")
that.setData({
loadShow:false
})
return;
}
if(infoData.measurePointPosition==""){
app.toast("请填写测量点位!")
that.setData({
loadShow:false
})
return;
}
if(infoData.qualityUser==""||infoData.qualityUserName==""){
app.toast("请选择质量专员!")
that.setData({
loadShow:false
})
return;
}
if(infoData.superviseUser==""||infoData.superviseUserName==""){
app.toast("请选择监理专员!")
that.setData({
loadShow:false
})
return;
}
if(infoData.measureTime==""){
app.toast("请选择测量时间!")
that.setData({
loadShow:false
})
return;
}
if(infoData.superviseUser==infoData.qualityUser){
app.toast("质量专员和监理专员不能是同一人!")
that.setData({
loadShow:false
})
return;
}
let fileUrls = [];
imageInfoData.forEach(async (item)=>{
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
if(item.indexOf(that.data.request)>-1){
fileUrls.push(item.replace(that.data.request,"").replace(".min.jpg",""));
}else{
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
let name = "file"
let obj = await that.syncUploadImage(uploadUrl,item,name);
fileUrls.push(obj.data.fileName);
}
//验证图片上传完毕
if(fileUrls.length == imageInfoData.length){
let params = {
id,
imageUrls:fileUrls.toString(),
measureType:infoData.measureType,
measureInfo:infoData.measureInfo,
measurePosition:infoData.measurePosition,
measurePointPosition:infoData.measurePointPosition,
qualityUser:infoData.qualityUser,
qualityUserName:infoData.qualityUserName,
superviseUser:infoData.superviseUser,
superviseUserName:infoData.superviseUserName,
measureTime:infoData.measureTime,
approveStatus:"1",
updateBy:loginName
}
wx.request({
url: app.globalData.reqUrl + '/wechat/projectMeasure/edit',
method:"POST",
data:params,
header: {
"Username": loginName,
"Content-Type": "application/json"
},
success(res){
that.setData({
loadShow:false
})
res = res.data
if(res.code == 200){
app.toast("修改成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../list/index',
})
},200)
}
}
})
}
})
},
/**
* 这里考虑上传图片异步问题封装为同步
*/
syncUploadImage(url,uploadFile,name) {
return new Promise((resolve, reject) => {
wx.uploadFile({
url, // 上传的服务器接口地址
filePath: uploadFile,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
resolve({
data: data
})
},
fail: (err) => {
//上传失败修改pedding为reject
console.log("访问接口失败", err);
wx.showToast({
title: "网络出错,上传失败",
icon: 'none',
duration: 1000
});
reject(err)
}
});
})
},
//选择测量类型
onSelectMeasureType(e){
this.setData({
"infoData.measureType":e.detail.id
})
},
//选择测量内容
onSelectMeasureInfo(e){
this.setData({
"infoData.measureInfo":e.detail.id
})
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../list/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,8 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item"
},
"navigationStyle":"custom"
}

View File

@ -0,0 +1,159 @@
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
</van-col>
<van-col span="15">
<view class="header_name">修改实测实量</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="inspect_info ">
<view class="module_title module_title_flex">
<view>{{projectName}}</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="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">
<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==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>
</van-collapse-item>
</van-collapse>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量图片</view>
<view class="problem_list_info_con">
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量类型</view>
<view class="inspect_info_content">
<voucher-select columns="{{measureTypeList}}" placeholder="请选择测量类型" bindchange="onSelectMeasureType" selectValue="{{infoData.measureType}}"></voucher-select>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量内容</view>
<view class="inspect_info_content">
<voucher-select columns="{{measureInfoTypeList}}" placeholder="请选择测量内容" bindchange="onSelectMeasureInfo" selectValue="{{infoData.measureInfo}}"></voucher-select>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">测量部位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写测量部位" model:value="{{infoData.measurePosition}}" placeholder-style="color:#6777aa;" bindinput="onInputMeasurePosition" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">测量点位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写测量点位" model:value="{{infoData.measurePointPosition}}" placeholder-style="color:#6777aa;" bindinput="onInputMeasurePointPosition" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">质量专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData2}}" multiple="{{fales}}" bindselected="onAddQualityUser" index="{{0}}" title="请选择质量专员" choose="{{infoData.qualityUserName}}">
</select-group-person>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">监理专员</view>
<view class="inspect_info_content">
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddSuperviseUser" index="{{1}}" title="请选择监理专员" choose="{{infoData.superviseUserName}}">
</select-group-person>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量时间</view>
<view class="inspect_info_content">
<voucher-datetime counts="5" placeholder="请选择测量时间" maxDate="{{maxDate}}" currentDate="{{currentDate}}" bindchange="onInputTime" time="{{infoData.measureTime}}"></voucher-datetime>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">提交</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="../../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -0,0 +1,54 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
.van-popup{
background: none !important;
}
.van-image__img{
border-radius: 10rpx !important;
}
.van-collapse.van-hairline--top-bottom:after{
border-width: 0px 0;
}
.van-cell.van-cell--borderless{
background-color: #2b345b;
color: #fff;
margin-top: 30rpx;
border-radius: 5rpx;
}
.van-cell.van-cell--borderless:active{
background-color: #2b345b;
}
.van-collapse-item__title.van-collapse-item__title--expanded:active{
background-color: #2b345b;
}
.van-collapse-item .van-cell:after{
border-bottom: 0;
}
.van-collapse-item.van-hairline--top:after{
border-top-width:0
}
.van-cell.van-cell--clickable{
background-color: #2b345b;
margin-top: 30rpx;
color: #fff;
border-radius: 15rpx;
}
.van-cell.van-cell--clickable:active{
background-color: #2b345b;
}
.van-collapse-item__wrapper .van-collapse-item__content{
background-color: #1e2336;
color:#8ca4ec ;
border-width: 0px 0;
}
.gk_open_con view{
padding: 10rpx 0;
width: 100%;
}
.gk_open_con image{
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
position: relative;
top: 5rpx;
}

View File

@ -32,6 +32,7 @@ Page({
loginName:res.data.loginName
})
this.getInfo();
this.getAuditinfo();
}
})
},
@ -68,7 +69,7 @@ Page({
loadShow:false
})
//判断当前能否删除
if(res.data.createBy==that.data.loginName){
if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){
that.setData({
showDel:true
})
@ -145,6 +146,14 @@ Page({
});
},
//跳转修改页面
onUpdate:function(){
let id = this.data.id;
wx.redirectTo({
url: `../edit/index?id=${id}`,
})
},
//展示图片
showImg:function(e){
var that=this;

View File

@ -24,11 +24,10 @@
<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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</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==3}}" class="timeline_for_state_2 color_purple">不合格</text>
</view>
</view>
</view>
@ -100,12 +99,13 @@
<van-col span="18">{{infoData.superviseUserName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.measureResult!=null}}">
<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.measureResult == 1}}" class="color_green">合格</text>
<text wx:if="{{infoData.measureResult == 2}}" class="color_orange">不合格</text>
<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>
@ -132,6 +132,7 @@
</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 File

@ -27,10 +27,16 @@ Page({
},
getInfo(e){
let {id} = e.currentTarget.dataset.set
let {id,approveStatus,superviseUser} = e.currentTarget.dataset.set
if(approveStatus=="1" && superviseUser==this.data.loginName){
wx.redirectTo({
url: `../info/index?id=${id}`,
url: `../../../pages/project_approve/approveMeasure/index?id=${id}`
})
}else{
wx.redirectTo({
url: `../info/index?id=${id}`
})
}
},
/**
@ -66,6 +72,7 @@ Page({
let param = {
"projectId": projectId,
"deptId":deptId,
"nowUserName":this.data.loginName,
"activeName": this.data.activeState,
}
this.queryCount(param);

View File

@ -29,8 +29,9 @@
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_img">
<view wx:if="{{item.measureResult==2}}" class="code_label code_label_red">不合格</view>
<view wx:if="{{item.measureResult==1}}" class="code_label code_label_green">合格</view>
<view wx:if="{{item.approveStatus==1}}" class="code_label_2 code_label_blueviolet">待审批</view>
<view wx:if="{{item.approveStatus==4}}" class="code_label_2 code_label_green">合格</view>
<view wx:if="{{item.approveStatus==3}}" class="code_label_2 code_label_red">不合格</view>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{request+item.mainImage+'.min.jpg'}}"/>
</view>
<view class="inspect_list_info_data">

View File

@ -38,14 +38,14 @@
<view class="inspect_info_title">隐患描述</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写质量隐患描述"
placeholder-style="color:#6777aa;" bindblur="onInputWorkParts" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputWorkParts" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">整改要求</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写隐患整改要求"
placeholder-style="color:#6777aa;" bindblur="onInputChangeInfoValue" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputChangeInfoValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">

View File

@ -139,7 +139,7 @@
<view class="inspect_info_list" >
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写整改复检意见"
placeholder-style="color:#6777aa;" bindblur="onInputOpinion" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200"/>
</view>
</view>
</view>

View File

@ -129,7 +129,7 @@
<view class="inspect_info_title">整改说明</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写整改说明"
placeholder-style="color:#6777aa;" bindblur="onInputOpinion" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">

View File

@ -38,14 +38,14 @@
<view class="inspect_info_title">隐患描述</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写质量隐患描述"
placeholder-style="color:#6777aa;" bindblur="onInputWorkParts" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputWorkParts" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list" >
<view class="inspect_info_title">整改要求</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写隐患整改要求"
placeholder-style="color:#6777aa;" bindblur="onInputChangeInfoValue" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputChangeInfoValue" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">

View File

@ -139,7 +139,7 @@
<view class="inspect_info_list" >
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写整改复检意见"
placeholder-style="color:#6777aa;" bindblur="onInputOpinion" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200"/>
</view>
</view>
</view>

View File

@ -128,7 +128,7 @@
<view class="inspect_info_title">整改说明</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写整改说明"
placeholder-style="color:#6777aa;" bindblur="onInputOpinion" maxlength="200"/>
placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200"/>
</view>
</view>
<view class="inspect_info_list">

View File

@ -27,77 +27,77 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">计划节点</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写计划节点描述"
placeholder-style="color:#6777aa;" model:value="{{data.plannedNode}}" maxlength="800" bindblur="plannedNodeAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.plannedNode}}" maxlength="800" bindinput="plannedNodeAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">实际节点</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写实际节点描述"
placeholder-style="color:#6777aa;" model:value="{{data.actualNode}}" maxlength="800" bindblur="actualNodeAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.actualNode}}" maxlength="800" bindinput="actualNodeAction"/>
</view>
</view>
<view class="inspect_info_list" wx:if="{{projectType!=4}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">融资、招采进展</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写融资、招采进展描述"
placeholder-style="color:#6777aa;" model:value="{{data.purchaseProgress}}" maxlength="800" bindblur="purchaseProgressAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.purchaseProgress}}" maxlength="800" bindinput="purchaseProgressAction"/>
</view>
</view>
<view class="inspect_info_list" wx:if="{{projectType==4}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">结算进展</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写结算进展描述"
placeholder-style="color:#6777aa;" model:value="{{data.purchaseProgress}}" maxlength="800" bindblur="purchaseProgressAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.purchaseProgress}}" maxlength="800" bindinput="purchaseProgressAction"/>
</view>
</view>
<view class="inspect_info_list" wx:if="{{projectType!=4}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">报建、设计进展</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写报建、设计进展描述"
placeholder-style="color:#6777aa;" model:value="{{data.designProgress}}" maxlength="800" bindblur="designProgressAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.designProgress}}" maxlength="800" bindinput="designProgressAction"/>
</view>
</view>
<view class="inspect_info_list" wx:if="{{projectType==4}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">运维进展</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写运维进展描述"
placeholder-style="color:#6777aa;" model:value="{{data.designProgress}}" maxlength="800" bindblur="designProgressAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.designProgress}}" maxlength="800" bindinput="designProgressAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">施工进展</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填施工进展描述"
placeholder-style="color:#6777aa;" model:value="{{data.constructionProgress}}" maxlength="800" bindblur="constructionProgressAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.constructionProgress}}" maxlength="800" bindinput="constructionProgressAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收进展</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写验收进展描述"
placeholder-style="color:#6777aa;" model:value="{{data.acceptanceProgress}}" maxlength="800" bindblur="acceptanceProgressAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.acceptanceProgress}}" maxlength="800" bindinput="acceptanceProgressAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">下周计划</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写下周计划描述"
placeholder-style="color:#6777aa;" model:value="{{data.planForNextWeek}}" maxlength="800" bindblur="planForNextWeekAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.planForNextWeek}}" maxlength="800" bindinput="planForNextWeekAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">存在问题</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写存在问题描述"
placeholder-style="color:#6777aa;" model:value="{{data.existingProblem}}" maxlength="800" bindblur="existingProblemAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.existingProblem}}" maxlength="800" bindinput="existingProblemAction"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">问题推进情况</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写问题推进情况描述"
placeholder-style="color:#6777aa;" model:value="{{data.problemProgress}}" maxlength="800" bindblur="problemProgressAction"/>
placeholder-style="color:#6777aa;" model:value="{{data.problemProgress}}" maxlength="800" bindinput="problemProgressAction"/>
</view>
</view>
<view class="safety_inspect_title module_title_flex">

View File

@ -19,7 +19,7 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">人员姓名</view>
<view class="inspect_info_content">
<input placeholder="请填写人员姓名" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="nameAction" maxlength="30"/>
<input placeholder="请填写人员姓名" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="nameAction" maxlength="30"/>
</view>
</view>
<view class="inspect_info_list">
@ -31,7 +31,7 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">联系方式</view>
<view class="inspect_info_content">
<input placeholder="请填写联系方式" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="phoneAction" maxlength="11" value="{{phoneNumber}}"/>
<input placeholder="请填写联系方式" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="phoneAction" maxlength="11" value="{{phoneNumber}}"/>
</view>
</view>
<view class="inspect_info_list">
@ -43,7 +43,7 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">证书编号</view>
<view class="inspect_info_content">
<input placeholder="请填写证书编号" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="credentialNumberAction" maxlength="50"/>
<input placeholder="请填写证书编号" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="credentialNumberAction" maxlength="50"/>
</view>
</view>
<view class="inspect_info_list">

View File

@ -25,7 +25,7 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">{{minTitle}}标题</view>
<view class="inspect_info_content">
<input placeholder="请填写{{minTitle}}标题" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="trainTitleAction" maxlength="30"/>
<input placeholder="请填写{{minTitle}}标题" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="trainTitleAction" maxlength="30"/>
</view>
</view>
<view class="inspect_info_list">
@ -37,14 +37,14 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">参与人数</view>
<view class="inspect_info_content">
<input type="number" placeholder="请填写参与人数" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindblur="onInputNumber" value="{{trainParticipants}}"/>
<input type="number" placeholder="请填写参与人数" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="onInputNumber" value="{{trainParticipants}}"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">{{minTitle}}内容</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写{{minTitle}}内容"
placeholder-style="color:#6777aa;" maxlength="800" bindblur="trainContent"/>
placeholder-style="color:#6777aa;" maxlength="800" bindinput="trainContent"/>
</view>
</view>
<view class="inspect_info_list" style="width: 100%;">

View File

@ -909,7 +909,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},

View File

@ -118,7 +118,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},

View File

@ -1378,7 +1378,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url:'../login/login',
url:'../login2/login',
})
},

View File

@ -5,19 +5,26 @@ Component({
* 组件的属性列表
*/
properties: {
limit:{
type:Number,
value:5
},
fileUrlArray:{
type:Array
},
limit:{
type:Number
}
},
/**数据监听 */
observers: {
fileUrlArray:function(val){
let lm = this.data.limit;
let showUpload=false;
if(val && val.length<lm){
showUpload=true;
}
this.setData({
uploaderList:val
uploaderList:val,
showUpload:showUpload
})
}
},

View File

@ -40,6 +40,15 @@ Component({
}
},
selectValue:function(val){
let columns = this.data.columns;
if(val && columns){
for(let i=0;i<columns.length;i++){
if(val==columns[i].id){
val=columns[i].text;
break;
}
}
}
this.setData({
value:val
})

View File

@ -21,6 +21,8 @@ Page({
hiddenn:true,
todoDB:0,
approveDB:0,
ad:0,
td:0,
},
@ -125,7 +127,7 @@ Page({
})
}else{
wx.setStorageSync('nav-menu', "gd");
wx.navigateTo({
wx.redirectTo({
url: event.currentTarget.dataset.url
})
}
@ -172,7 +174,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},
@ -215,8 +217,12 @@ Page({
if(res.code=="200"){
that.setData({
todoDB:res.data.todo,
approveDB:res.data.approve,
td:res.data.todo,
ad:res.data.approve
})
console.log("db");
console.log(that.data.todoDB)
console.log(that.data.approveDB)
}
}
})

View File

@ -1,12 +1,7 @@
{
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-action-sheet": "@vant/weapp/action-sheet",
"van-sticky": "@vant/weapp/sticky",
"van-tabbar": "@vant/weapp/tabbar",
"van-tabbar-item": "@vant/weapp/tabbar-item",
"van-popup": "@vant/weapp/popup/index"
"van-tabbar-item": "@vant/weapp/tabbar-item"
},
"navigationStyle":"custom"
}

View File

@ -60,7 +60,6 @@
<van-col span="8" wx:for="{{menuList}}" wx:key="unique">
<view class="gd_min" data-id="{{item.menu_identi}}" data-url="{{item.menu_url}}" bindtap="goMenu">
<span class="tabNum_active" wx:if="{{item.menu_identi=='GCSQGL' && todoDB>0}}">{{todoDB}}</span>
<span class="tabNum_active" wx:if="{{item.menu_identi=='XMSPGL' && approveDB>0}}">{{approveDB}}</span>
<image src="{{item.menu_img}}"></image>
<view>{{item.menu_name}}</view>
</view>
@ -144,6 +143,7 @@
style="width:40rpx; height: 40rpx;"
/>
质量管理
<span class="tabNum" wx:if="{{ad>0}}">{{ad}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL2">
@ -176,6 +176,6 @@
style="width:40rpx; height:40rpx;"
/>
更多功能
<span class="tabNum" wx:if="{{db>0}}">{{db}}</span>
<span class="tabNum" wx:if="{{td>0}}">{{td}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -292,7 +292,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},
/**

View File

@ -1,17 +1,16 @@
<!--pages/login/login.wxml-->
<view class="login_logo">
<image src="https://cf.makalu.cc/profile/wechat/logo.png"></image>
<image src="https://cf.makalu.cc/profile/wechat/logo4.png"></image>
</view>
<view class="login_bg">
<view class="login_title">
<text>北跨泾河-产发工程数字管理平台</text>
</view>
<view class="login_bg">
<view class="login_ex">产发工程数字管理平台,请使用手机号登录</view>
<view class="login_ex">请使用手机号登录</view>
<view class="login_input">
<input placeholder="输入账户号码" placeholder-style="color:#5e6ea2" bindblur="name"/>
<input placeholder="输入账户号码" placeholder-style="color:#5e6ea2" bindinput="name"/>
</view>
<view class="login_input">
<input placeholder="输入账户密码" placeholder-style="color:#5e6ea2" password="true" bindinput="psw"/>

View File

@ -6,7 +6,7 @@ page{
height: 180rpx;
line-height: 180rpx;
color: #728ce3;
font-size: 45rpx;
font-size: 40rpx;
font-weight: bold;
text-align: center;
}
@ -17,6 +17,8 @@ page{
border-radius: 20rpx;
margin: 0 40rpx;
padding: 25rpx 40rpx;
margin-top: 50rpx;
border: 1rpx solid #728ce3;
}
.login_dl{
color: #ffffff;
@ -26,8 +28,9 @@ page{
.login_ex{
padding:20rpx 0;
font-size: 28rpx;
color: #8ca4ee;
text-align: center;
color: #c7d1f3;
border-bottom: 20rpx dashed #ffffff;
width: 45%;
}
.login_input{
margin-top: 50rpx;
@ -35,7 +38,7 @@ page{
.login_input input{
border-bottom: 1px solid #5e6ea2;
height: 100rpx;
width: 100%;
width: 93%;
color: #728ce3;
padding: 0 20rpx;
}
@ -46,19 +49,19 @@ page{
border-radius: 80rpx;
text-align: center;
line-height: 80rpx;
margin-bottom: 150rpx;
}
.login_btn:active{
margin:82rpx 55rpx 0;
}
.login_logo{
width: 100%;
height:150rpx;
height:80rpx;
margin-top: 60rpx;
text-align: center;
padding-top: 100rpx;
}
.login_logo image{
width: 77%;
height: 130rpx;
height: 72rpx;
}

View File

@ -0,0 +1,202 @@
// pages/login/login.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
username:'',
password:'',
show:false,
openId:'',
},
//获取填写的账号信息
name:function(even){
this.setData({
username:even.detail.value
})
},
//获取填写的密码信息
psw:function(even){
this.setData({
password:even.detail.value
})
},
onClickShow() {
this.setData({ show: true });
},
onClickHide() {
this.setData({ show: false });
},
onLoad: function (option) {
this.getOPenId();
},
/**
* 获取用户openid
*/
getOPenId:function () {
wx.login({
success :res=>{
//启动蒙版
let oid = wx.getStorageSync("openId");
if(!oid){
this.onClickShow();
wx.request({
url: app.globalData.reqUrl+'/wechat/getOpenId',
data:{
"code": res.code,
"appId": app.globalData.appId,
},
success:(res)=>{
res = res.data;
this.onClickHide();
this.setData({
openId:res.data.openid,
})
wx.setStorageSync('openId', res.data.openid)
//验证登录用户
this.selectUserInfoByOpenId(res.data.openid);
}
})
}else{
//验证登录用户
this.selectUserInfoByOpenId(oid);
}
}
})
},
//验证用户是否是第一次登陆
selectUserInfoByOpenId:function(openId){
//跳转页面
let isRelogin=wx.getStorageSync("isReload");
if(isRelogin){
return;
}
this.onClickShow();
var that = this;
wx.request({
url: app.globalData.reqUrl+'/wechat/openIdLogin',
data:{
"openId":openId
},
method:"POST",
success:function(res){
if(res.data.code == '200'){
//把数据存到缓存中
wx.setStorage({
key: 'userinfo',
data: res.data.data.userinfo
});
// wx.setStorageSync({
// key: 'token',
// data: res.data.token
// });
that.onClickHide();
let rd = res.data.data;
//只有一个项目时直接跳转详情页
if(rd.projectInfo!=null || rd.projectInfo!=undefined){
//赋值到公共参数
app.globalData.projectId = rd.projectInfo.projectId;
app.globalData.projectName = rd.projectInfo.projectName;
app.globalData.projectInfoList = [];
app.globalData.projectInfoList.push(rd.projectInfo);
app.globalData.value1 = rd.projectInfo.shengName;
app.globalData.value2 = rd.projectInfo.shiName+'/'+rd.projectInfo.quName;
app.globalData.value3 = rd.projectInfo.logCompanyName;
wx.redirectTo({
url: '../xiangmugaikuang/xiangmugaikuang',
})
}else{
//跳转页面
wx.redirectTo({
url: '../map/map',
})
}
}else{
that.onClickHide();
}
}
})
},
//登录
userLogin:function(openid){
var that = this;
var username = that.data.username;
var password = that.data.password;
if(username == ""){
app.toast("账号不能为空");
return;
}
if(password == ""){
app.toast("密码不能为空");
return;
}
let openId = that.data.openId
if(openId==""){
openId = wx.getStorageSync("openId");
if(openId==""){
app.toast("获取微信授权失败,请卸载后重新进入应用!!");
return;
}
}
//启动蒙版
that.onClickShow();
//发送请求
wx.request({
url: app.globalData.reqUrl+'/wechat/login',
data:{
"username":username,
"password":password,
"openId":openId,
},
method:"POST",
success(res){
//关闭蒙版
that.onClickHide();
if(res.data.code=='200'){
//把数据存到缓存中
wx.setStorage({
key: 'userinfo',
data: res.data.data.userinfo
});
// wx.setStorageSync({
// key: 'token',
// data: res.data.token
// });
wx.setStorageSync('isReload', "");
let rd = res.data.data;
//只有一个项目时直接跳转详情页
if(rd.projectInfo!=null || rd.projectInfo!=undefined){
//赋值到公共参数
app.globalData.projectId = rd.projectInfo.projectId;
app.globalData.projectName = rd.projectInfo.projectName;
app.globalData.projectInfoList = [];
app.globalData.projectInfoList.push(rd.projectInfo);
app.globalData.value1 = rd.projectInfo.shengName;
app.globalData.value2 = rd.projectInfo.shiName+'/'+rd.projectInfo.quName;
app.globalData.value3 = rd.projectInfo.logCompanyName;
wx.redirectTo({
url: '../xiangmugaikuang/xiangmugaikuang',
})
}else{
//跳转页面
wx.redirectTo({
url: '../map/map',
})
}
}else{
app.toast(res.data.msg);
}
}
})
},
})

View File

@ -0,0 +1,5 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index"
}
}

View File

@ -0,0 +1,58 @@
<!--pages/login/login.wxml-->
<view class="login_logo">
<image src="https://cf.makalu.cc/profile/wechat/logo5.png"></image>
</view>
<view class="login_bg">
<view class="login_title">
<text>北跨泾河-产发工程数字管理平台</text>
</view>
<view class="login_input">
<input class="user" placeholder="输入账户号码" placeholder-style="color:#5e6ea2" bindinput="name"/>
</view>
<view class="login_input">
<input class="pass" placeholder="输入账户密码" placeholder-style="color:#5e6ea2" password="true" bindinput="psw"/>
</view>
<view class="login_btn" bindtap="userLogin">
确 定
</view>
<van-overlay show="{{show}}">
<view class="gif">
<image src="../../images/loding2.gif"></image>
<view>正在登陆中!请稍后...</view>
</view>
</van-overlay>
</view>

View File

@ -0,0 +1,72 @@
/* pages/login/login.wxss */
page{
/* background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%; */
}
.login_title{
height: 180rpx;
line-height: 180rpx;
color: #FFFFFF;
font-size: 40rpx;
font-weight: bold;
text-align: center;
}
.login_bg{
border-radius: 20rpx;
margin: 0 40rpx;
padding: 25rpx 40rpx;
margin-top: 80rpx;
background-color: #000000;
border: 1rpx solid #FFFFFF;
}
.login_dl{
color: #ffffff;
font-size: 40rpx;
font-weight: bold;
}
.login_ex{
padding:20rpx 0;
font-size: 28rpx;
color: #c7d1f3;
border-bottom: 20rpx dashed #ffffff;
width: 45%;
}
.login_input{
margin-top: 50rpx;
}
.login_input input{
border: 1px solid #5e6ea2;
border-radius: 5%;
height: 100rpx;
width: 93%;
color: #728ce3;
padding: 0 20rpx;
border-radius: 10px;
}
.login_btn{
margin:80rpx 50rpx 0;
height: 80rpx;
background-image: linear-gradient(#5b9fff, #7655fc);
border-radius: 80rpx;
text-align: center;
line-height: 80rpx;
margin-bottom: 150rpx;
}
.login_btn:active{
margin:82rpx 55rpx 0;
}
.login_logo{
width: 100%;
height:80rpx;
margin-top: 50rpx;
margin-left: 45rpx;
}
.login_logo image{
height: 72rpx;
width: 180rpx;
}

View File

@ -183,7 +183,7 @@ Page({
app.toast("审批成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../index',
url: '../../../pageage/project_checkDetection/list/index',
})
},200)
}
@ -247,7 +247,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../index',
url: '../../../pageage/project_checkDetection/list/index',
})
},

View File

@ -24,11 +24,10 @@
<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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</text>
<text wx:if="{{infoData.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{infoData.approveStatus!=1}}">审批取样复试</text>
<text wx:if="{{infoData.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{infoData.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
</view>
</view>
</view>
@ -151,6 +150,17 @@
</van-col>
</van-row>
</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==null}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">送检中</text>
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_yellow" 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>
<view class="inspect_overview" wx:if="{{infoData.approveStatus=='1'}}">

View File

@ -32,6 +32,7 @@ Page({
loginName:res.data.loginName
})
this.getInfo();
this.getAuditinfo();
}
})
},
@ -135,7 +136,7 @@ Page({
app.toast("审批成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../index',
url: '../../../pageage/project_checking/list/index',
})
},200)
}
@ -223,7 +224,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../index',
url: '../../../pageage/project_checking/list/index',
})
},

View File

@ -24,11 +24,10 @@
<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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</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==3}}" class="timeline_for_state_2 color_purple">不合格</text>
</view>
</view>
</view>
@ -94,11 +93,14 @@
<van-col span="18">{{infoData.checkingDate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.checkResult!=null}}">
<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 wx:if="{{infoData.checkResult == '1'}}" span="18" class="color_green">验收合格</van-col>
<van-col wx:if="{{infoData.checkResult == '2'}}" span="18" class="color_orange">验收不合格</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 class="inspect_overview_list">

View File

@ -43,6 +43,7 @@ Page({
loginName:res.data.loginName
})
this.getInfo();
this.getAuditinfo();
}
})
},
@ -200,7 +201,7 @@ Page({
app.toast("审批成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../index',
url: '../../../pageage/project_materialSeal/list/index',
})
},200)
}
@ -335,7 +336,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../list/index'
url: '../../../pageage/project_materialSeal/list/index',
})
},

View File

@ -24,11 +24,10 @@
<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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</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==3}}" class="timeline_for_state_2 color_purple">不合格</text>
</view>
</view>
</view>
@ -123,12 +122,13 @@
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.materialResult!=null}}">
<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.materialResult == 1}}" class="color_green">合格</text>
<text wx:if="{{infoData.materialResult == 2}}" class="color_orange">不合格</text>
<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 File

@ -35,6 +35,7 @@ Page({
loginName:res.data.loginName
})
this.getInfo();
this.getAuditinfo();
}
})
},
@ -144,7 +145,7 @@ Page({
app.toast("审批成功!")
setTimeout(()=>{
wx.redirectTo({
url: '../index',
url: '../../../pageage/project_measure/list/index',
})
},200)
}
@ -217,7 +218,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
url: '../list/index',
url: '../../../pageage/project_measure/list/index',
})
},

View File

@ -24,8 +24,8 @@
<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">
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
<text wx:if="{{item.approveStatus==1}}">提交实测实量</text>
<text wx:if="{{item.approveStatus!=1}}">审批实测实量</text>
{{item.commentResult}}
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</text>
@ -101,12 +101,13 @@
<van-col span="18">{{infoData.superviseUserName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.measureResult!=null}}">
<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.measureResult == 1}}" class="color_green">合格</text>
<text wx:if="{{infoData.measureResult == 2}}" class="color_orange">不合格</text>
<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 File

@ -38,7 +38,12 @@ Page({
checkValue:0,
checkPassRate:100,
materialSealStatistics:[{ name: "其它", value: 0, prop: 0}],
db:0,
todoDb:0,
approveDb:0,
qyfsDb:0,
scslDb:0,
jpysDb:0,
clfyDb:0,
},
/**
@ -323,7 +328,7 @@ Page({
goMenu:function(event){
wx.setStorageSync('nav-menu', "zl");
wx.navigateTo({
wx.redirectTo({
url: event.currentTarget.dataset.url
})
},
@ -418,7 +423,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},
//修改密码
@ -455,8 +460,14 @@ Page({
res = res.data;
if(res.code=="200"){
that.setData({
db:(res.data.todo+res.data.approve)
todoDb:res.data.todo,
approveDb:res.data.approve,
qyfsDb:res.data.approveQYFS,
scslDb:res.data.approveSCSL,
jpysDb:res.data.approveJPYS,
clfyDb:res.data.approveCLFY
})
console.log(that.data)
}
}
})

View File

@ -57,6 +57,10 @@
<van-row class="demo clearfix">
<van-col span="8" wx:for="{{menuList}}" wx:key="unique">
<view class="gd_min" data-id="{{item.menu_identi}}" data-url="{{item.menu_url}}" bindtap="goMenu">
<span wx:if="{{item.menu_identi=='SCSLGL'}}"><span class="tabNum_active" wx:if="{{scslDb>0}}">{{scslDb}}</span></span>
<span wx:if="{{item.menu_identi=='CLFYGL'}}"><span class="tabNum_active" wx:if="{{clfyDb>0}}">{{clfyDb}}</span></span>
<span wx:if="{{item.menu_identi=='JPYSGL'}}"><span class="tabNum_active" wx:if="{{jpysDb>0}}">{{jpysDb}}</span></span>
<span wx:if="{{item.menu_identi=='QYFS'}}"><span class="tabNum_active" wx:if="{{qyfsDb>0}}">{{qyfsDb}}</span></span>
<image src="{{item.menu_img}}"></image>
<view>{{item.menu_name}}</view>
</view>
@ -442,6 +446,7 @@
style="width:40rpx; height: 40rpx;"
/>
质量管理
<span class="tabNum" wx:if="{{approveDb>0}}">{{approveDb}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
@ -474,6 +479,6 @@
style="width:40rpx; height:40rpx;"
/>
更多功能
<span class="tabNum" wx:if="{{db>0}}">{{db}}</span>
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -556,7 +556,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},

View File

@ -37,7 +37,8 @@ Page({
},
menuList:[],
request:app.globalData.reqUrl,
db:0,
todoDb:0,
approveDb:0,
},
//项目切换 返回值
@ -397,7 +398,7 @@ Page({
goMenu:function(event){
wx.setStorageSync('nav-menu', "aq");
wx.navigateTo({
wx.redirectTo({
url: event.currentTarget.dataset.url
})
},
@ -436,7 +437,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},
//修改密码
@ -466,7 +467,8 @@ Page({
res = res.data;
if(res.code=="200"){
that.setData({
db:(res.data.todo+res.data.approve)
todoDb:res.data.todo,
approveDb:res.data.approve
})
}
}

View File

@ -228,6 +228,7 @@
style="width:40rpx; height: 40rpx;"
/>
质量管理
<span class="tabNum" wx:if="{{approveDb>0}}">{{approveDb}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
@ -260,7 +261,7 @@
style="width:40rpx; height:40rpx;"
/>
更多功能
<span class="tabNum" wx:if="{{db>0}}">{{db}}</span>
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -122,7 +122,7 @@ Page({
wx.setStorageSync('isReload', "1");
app.toast("密码修改成功!");
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
});
}else{
app.toast(res.data.info);

View File

@ -296,7 +296,8 @@ Page({
//加载模板参数
loadShow:false,
initData:{},
db:0,
todoDb:0,
approveDb:0,
},
//项目切换 返回值
@ -647,7 +648,7 @@ Page({
wx.clearStorageSync();
wx.setStorageSync('isReload', "1")
wx.redirectTo({
url: '../login/login',
url: '../login2/login',
})
},
@ -691,8 +692,10 @@ Page({
res = res.data;
if(res.code=="200"){
that.setData({
db:(res.data.todo+res.data.approve)
todoDb:res.data.todo,
approveDb:res.data.approve
})
console.log("db"+that.data.approveDb);
}
}
})

View File

@ -199,6 +199,7 @@
style="width:40rpx; height: 40rpx;"
/>
质量管理
<span class="tabNum" wx:if="{{approveDb>0}}">{{approveDb}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL2">
@ -231,7 +232,7 @@
style="width:40rpx; height:40rpx;"
/>
更多功能
<span class="tabNum" wx:if="{{db>0}}">{{db}}</span>
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>