提交代码

main
姜玉琦 2024-05-03 10:37:27 +08:00
parent ec75179b6d
commit c3cf671949
105 changed files with 5442 additions and 2706 deletions

View File

@ -1,4 +1,6 @@
import {request} from '../utils/request'
import {
request
} from '../utils/request'
// 获取验证码
export function getCodeImg() {
@ -8,19 +10,28 @@ export function getCodeImg() {
})
}
// 登录方法
// 用户登录
export function login(data) {
return request({
url: '/wxApi/login',
url: '/wechat/login',
method: 'post',
data: data,
})
}
// 登录方法
// 修改密码
export function updatePwd(data) {
return request({
url: '/wxApi/updatePwd',
url: '/wechat/v1/updatePassword',
method: 'post',
data: data,
})
}
// 修改密码
export function codeUpdatePwd(data) {
return request({
url: '/wechat/v1/codeUpdatePwd',
method: 'post',
data: data,
})
@ -34,6 +45,17 @@ export function loginOut() {
})
}
// 发送短信验证码
export function sendPhoneMessage(phoneNumber) {
return request({
url: '/wechat/v1/sendPhoneMessage',
method: 'post',
data: {
'phoneNumber': phoneNumber
}
})
}
// 查询公众号消息授权
export function findOpenUserMsgId(openId) {
return request({

View File

@ -57,3 +57,11 @@ export function findProjectApplyData(id){
method: 'get'
})
}
// 获取系统字典信息
export function getDictCache(type){
return request({
url: '/wechat/publics/v1/getDictCache/'+type,
method: 'get'
})
}

View File

@ -1,4 +1,6 @@
//app.js
import {
getToken
} from '/utils/auth'
//全局分享
!function(){
@ -78,11 +80,18 @@ App({
})
}
this.autoUpdate();
if(!getToken()){
setTimeout(() => {
this.toast("请使用手机号码登录",1500);
}, 1000);
wx.redirectTo({
url: '/pages/login/index',
});
return false;
}
},
onLoad(){
},
onLoad(){},
//页面弹窗
toast: function (msg) {

View File

@ -1,6 +1,7 @@
{
"pages": [
"pages/login/index",
"pages/alter-ps/index",
"pages/wx-auth/index",
"pages/gongchengliebiao/index",
"pages/gengduogongneng/index",

View File

@ -1868,3 +1868,7 @@ swiper-item video {
.van-steps--horizontal{
padding: 10px 20px !important;
}
.files_parent{
margin-bottom: 20rpx;
}

View File

@ -4,6 +4,5 @@ module.exports = {
appId: "wx9997d071b4996f23",
//baseUrl: 'http://127.0.0.1:8091',
baseUrl: 'https://szgcwx.jhncidg.com',
manageUrl: 'https://szgc.jhncidg.com',
noSecuritys:['/wechat/captchaImage','/wxApi/login']
noSecuritys:['/wechat/captchaImage','/wechat/login','/wechat/v1/sendPhoneMessage','/wechat/v1/codeUpdatePwd']
};

View File

@ -151,14 +151,14 @@
</view>
<view class="inspect_info">
<view class="inspect_info_list" >
<view class="inspect_info_title">处理意见 <text style="color: #fd6060;">[必填项]</text></view>
<view class="inspect_info_title">处理意见 <text class="code_label_2" style="color: #fd6060;">[必填项]</text></view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写处理意见600字内"
placeholder-style="color:#6777aa;" bindinput="onInputFlowComment" maxlength="600"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">凭证附件 <text style="color: #CCC;">[非必填]</text></view>
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">凭证附件 <text class="code_label_2" style="color: #CCC;">[非必填]</text></view>
<view class="problem_list_info_con">
<file-uploader bindimages="onImagesArr" limit="{{9}}"></file-uploader>
</view>

View File

@ -1,4 +1,7 @@
import {list,findGroupCountByApprove} from "../../../api/flowLabour"
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
@ -38,19 +41,19 @@ Page({
wx.redirectTo({
url: `../check/index?id=${id}`,
})
}else if(this.data.minRoleId=='4' (approveStatus == '20' || approveStatus == '31')){
}else if(this.data.minRoleId=='4' && (approveStatus == '20' || approveStatus == '31')){
wx.redirectTo({
url: `../check/index?id=${id}`,
})
}else if(this.data.minRoleId=='4' (approveStatus == '10' || approveStatus == '21')){
}else if(this.data.minRoleId=='4' && (approveStatus == '10' || approveStatus == '21')){
wx.redirectTo({
url: `../info/index?id=${id}`,
})
}else if(this.data.minRoleId!='4' (approveStatus == '10' || approveStatus == '21')){
}else if(this.data.minRoleId!='4' && (approveStatus == '10' || approveStatus == '21')){
wx.redirectTo({
url: `../check/index?id=${id}`,
})
}else if(this.data.minRoleId!='4' (approveStatus == '20' || approveStatus == '31')){
}else if(this.data.minRoleId!='4' && (approveStatus == '20' || approveStatus == '31')){
wx.redirectTo({
url: `../info/index?id=${id}`,
})
@ -66,6 +69,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../../pages/login/index',
})
}
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
@ -95,12 +103,8 @@ Page({
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
}
})
} else {
@ -175,13 +179,17 @@ Page({
//判断角色,
let mr = this.data.minRoleId;
let deptId = this.data.deptId;
let projDept = this.data.deptId;
if (mr == 2 || mr == 3 || mr == 4) {
deptId = 0;
}
if(mr == 4){
projDept = app.globalData.projectInfoList[0].deptId
}
let param = {
"projectId": this.data.projectId,
"deptId": deptId,
"nowDept": deptId,
"nowDept": projDept,
"nowRole": mr,
"nowUser": this.data.loginName,
"activeName": that.data.activeState

View File

@ -14,7 +14,7 @@
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}}</text></view>
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}}</text></view>
@ -26,11 +26,11 @@
<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_3">投诉时间:{{format.parseDate(item.createTime)}}</view>
<view wx:if="{{item.approveStatus=='10'}}" class="code_label_4 code_label_blueviolet">待项目经理审批</view>
<view wx:if="{{item.approveStatus=='21'}}" class="code_label_4 code_label_red">甲方代表审批驳回</view>
<view wx:if="{{item.approveStatus=='20'}}" class="code_label_4 code_label_blueviolet">待甲方代表审</view>
<view wx:if="{{item.approveStatus=='31'}}" class="code_label_4 code_label_red">集团公司审批驳回</view>
<view wx:if="{{item.approveStatus=='30'}}" class="code_label_4 code_label_blueviolet">待集团公司审</view>
<view wx:if="{{item.approveStatus=='10'}}" class="code_label_4 code_label_blueviolet">待项目经理</view>
<view wx:if="{{item.approveStatus=='21'}}" class="code_label_4 code_label_red">甲方代表驳回</view>
<view wx:if="{{item.approveStatus=='20'}}" class="code_label_4 code_label_blueviolet">待甲方代表审</view>
<view wx:if="{{item.approveStatus=='31'}}" class="code_label_4 code_label_red">集团公司驳回</view>
<view wx:if="{{item.approveStatus=='30'}}" class="code_label_4 code_label_blueviolet">待集团公司审</view>
<view wx:if="{{item.approveStatus=='100'}}" class="code_label_4 code_label_green">审批完成</view>
</view>
</view>

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/addSafetyInspect/index.js
import {
syncFileUpload
} from '../../../utils/request'
const app = getApp()
Page({
@ -7,7 +9,6 @@ Page({
*/
data: {
maxDate: new Date(2088, 1, 1).getTime(),
currentDate:new Date().getTime(),
deptId: "",
projectId: "",
projectName: "",
@ -24,16 +25,38 @@ Page({
witnessUserName: "",
checkTime: "",
laboratoryName: "",
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
active: 0
qualifiedFlagList: [{
id: 'Y',
text: "是"
}, {
id: 'N',
text: "否"
}],
flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '检测报告'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 0,
trustDeed: [],
attachment: [],
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {projectId,projectName} = options
let {
projectId,
projectName
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -88,7 +111,10 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
})
that.setData({
checkTypeList: list
@ -168,7 +194,10 @@ Page({
loadShow: true
})
let that = this
let {projectId,deptId,checkType,
let {
projectId,
deptId,
checkType,
materialName,
usePosition,
sampleNum,
@ -176,7 +205,11 @@ Page({
witnessUser,
witnessUserName,
checkTime,
laboratoryName,loginName} = that.data;
laboratoryName,
loginName,
trustDeed,
attachment
} = that.data;
//数据效验
if (projectId == "" || loginName == "" || deptId == "") {
app.toast("数据异常,请刷新页面重试!")
@ -248,6 +281,31 @@ Page({
})
return;
}
if (trustDeed.length == 0) {
app.toast("请上传检验委托单!")
that.setData({
loadShow: false
})
return;
}
if (attachment.length > 0) {
for (let i = 0; i < attachment.length; i++) {
let _fileType = attachment[i].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if (this.data.fileType.indexOf(_fileType) == -1) {
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
that.setData({
loadShow: false
});
return;
}
}
}
let _files = [];
trustDeed.forEach(item => {
syncFileUpload(item).then(res => {
if (res.code == 200) {
let params = {
projectId,
deptId,
@ -258,16 +316,41 @@ Page({
qualifiedFlag,
witnessUser,
witnessUserName,
checkTime:checkTime+":00",
checkTime: checkTime,
laboratoryName,
createBy:loginName
createBy: loginName,
trustDeed: res.fileName
}
if (attachment.length > 0) {
attachment.forEach(file => {
syncFileUpload(file.path).then(res => {
_files.push(res.fileName);
if (attachment.length == _files.length) {
params.attachment = JSON.stringify(_files);
this.submitForm(params);
}
});
});
} else {
this.submitForm(params);
}
}
});
});
},
/**
* 提交表单
* @param {*} params
*/
submitForm(params) {
let that = this;
wx.request({
url: app.globalData.reqUrl + '/wechat/projectDetection/add',
method: "POST",
data: params,
header: {
"Username": loginName,
"Username": that.data.loginName,
"Content-Type": "application/json"
},
success(res) {
@ -300,6 +383,24 @@ Page({
})
},
// list 上传图片
onImagesArr(e) {
this.setData({
trustDeed: e.detail
})
},
/**
* 相关附件上传
* @param {*} options
*/
otherFileUpload(options) {
let file = options.detail;
this.setData({
attachment: file
});
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({

View File

@ -3,7 +3,9 @@
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">新增取样复试</view>
@ -38,8 +40,7 @@
<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;" bindinput="onInputUsePositionValue" maxlength="200"/>
<textarea class="add_textarea" placeholder="请填写使用部位" placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200" />
</view>
</view>
<view class="inspect_info_list">
@ -58,7 +59,7 @@
<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"></voucher-datetime>
<voucher-date counts="5" placeholder="请选择送检时间" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
</view>
</view>
<view class="inspect_info_list">
@ -67,6 +68,18 @@
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检验委托单</view>
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" limit="{{1}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
<view class="inspect_info_content">
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}"></file-uploader-all>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
@ -80,51 +93,3 @@
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -14,20 +14,39 @@ Page({
detectionImageList: [],
minDetectionFileImages: [],
detectionFiles: [],
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
list: [{
id: 1,
text: "合格"
}, {
id: 2,
text: "不合格"
}],
detectionResult: "1",
detectionFileData: [],
fileType: ["pdf", "png", "jpg", "jpeg"],
request: app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
active: 2
flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '检测报告'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 2,
attachments: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
let {
id
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -51,7 +70,9 @@ Page({
*
*/
getInfo() {
let {id} = this.data
let {
id
} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectDetection/info',
@ -79,8 +100,22 @@ Page({
}
});
}
let attachments = [];
if (res.data.attachment) {
let files = JSON.parse(res.data.attachment);
if (files && files.length > 0) {
files.forEach(item => {
let it = item.split('/');
attachments.push({
'name': it[it.length - 1],
path: item
});
});
}
}
that.setData({
infoData: res.data,
attachments,
detectionImageList: imageUrls,
minDetectionFileImages: minImageUrls,
detectionFiles: fileUrls,
@ -103,7 +138,12 @@ Page({
loadShow: true
})
let that = this
let {id,detectionResult,detectionFileData,loginName} = that.data;
let {
id,
detectionResult,
detectionFileData,
loginName
} = that.data;
//数据效验
if (id == "" || loginName == "") {
app.toast("数据异常,请刷新页面重试!")
@ -188,7 +228,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -227,7 +269,9 @@ Page({
})
},
deleteData() {
let {id} = this.data
let {
id
} = this.data
wx.request({
url: app.globalData.reqUrl + '/wechat/projectDetection/remove',
header: {
@ -262,6 +306,21 @@ Page({
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
//展示图片
showImg2: function (e) {
if (this.data.infoData.trustDeed != null) {
let imgs = this.data.infoData.trustDeed.split(',');
let list = [];
imgs.forEach(item => {
list.push(this.data.request + item);
})
wx.previewImage({
urls: list,
current: imgs[e.currentTarget.dataset.index]
})
}
},
//选择检测类型
onSelect(e) {
this.setData({
@ -276,6 +335,31 @@ Page({
});
},
/**
* 下载附件
* @param {*} e
*/
downFile: function (e) {
let {
path,
} = e.currentTarget.dataset.set
wx.downloadFile({
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
},
fail: function (res) {
console.log(res)
}
})
}
})
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({

View File

@ -1,4 +1,4 @@
<!--pageage/safetyManagement/problemRectification/index.wxml-->
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="header_title">
<view class="header_title_row">
<van-row>
@ -70,6 +70,27 @@
<van-col span="18">{{infoData.laboratoryName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.trustDeed!=null}}">
<van-row>
<van-col span="6"><text class="color_purple">委托单</text></van-col>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{format.split(infoData.trustDeed,',')}}" wx:key="index">
<image bindtap='showImg2' data-index="{{index}}" src="{{request+item+'.min.jpg'}}"></image>
</view>
</view>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
<van-row>
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
<van-col span="18"></van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
<view class="files_parent" wx:for="{{attachments}}" wx:key="index" bindtap="downFile" data-set="{{item}}">
<text class="color_blue files">{{item.name}}</text>
</view>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">提交单位</text></van-col>

View File

@ -8,7 +8,6 @@ Page({
data: {
id: "",
maxDate: new Date(2088, 1, 1).getTime(),
currentDate:new Date().getTime(),
deptId: "",
projectId: "",
projectName: "",
@ -31,19 +30,40 @@ Page({
fileUrlArray: [],
activeName: "",
flowRecordList: [],
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
qualifiedFlagList: [{
id: 'Y',
text: "是"
}, {
id: 'N',
text: "否"
}],
detectionFileData: [],
fileType: ["pdf", "png", "jpg", "jpeg"],
request: app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
active: 1
flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '检测报告'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 1,
trustDeed: [],
attachments: [],
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
let {
id
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -101,7 +121,10 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
})
that.setData({
checkTypeList: list
@ -116,7 +139,9 @@ Page({
*
*/
getInfo() {
let {id} = this.data
let {
id
} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectDetection/info',
@ -136,11 +161,35 @@ Page({
let it = element.split('/');
fileNames.push(it[it.length - 1]);
fileUrls.push(element);
fileUrlArray.push({name:it[it.length-1],path:element});
fileUrlArray.push({
name: it[it.length - 1],
path: element
});
});
}
let trustDeed = [];
if (res.data.trustDeed != null) {
res.data.trustDeed.split(',').forEach(item => {
trustDeed.push(that.data.request + item + '.min.jpg');
});
}
let attachments = [];
if (res.data.attachment) {
let files = JSON.parse(res.data.attachment);
if (files && files.length > 0) {
files.forEach(item => {
let it = item.split('/');
attachments.push({
'name': it[it.length - 1],
path: item
});
});
}
}
that.setData({
infoData: res.data,
trustDeed,
attachments,
detectionFiles: fileNames,
fileUrlArray,
fileUrls,
@ -268,7 +317,9 @@ Page({
loadShow: true
})
let that = this
let {id,checkType,
let {
id,
checkType,
materialName,
usePosition,
sampleNum,
@ -276,7 +327,12 @@ Page({
witnessUser,
witnessUserName,
checkTime,
laboratoryName,loginName,detectionFileData} = that.data;
laboratoryName,
loginName,
detectionFileData,
trustDeed,
attachments
} = that.data;
//数据效验
if (id == "") {
app.toast("数据异常,请刷新页面重试!")
@ -348,6 +404,27 @@ Page({
})
return;
}
if (trustDeed.length == 0) {
app.toast("请上传送检委托单!")
that.setData({
loadShow: false
})
return;
}
if (attachments.length > 0) {
for (let i = 0; i < attachments.length; i++) {
let _fileType = attachments[i].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if (this.data.fileType.indexOf(_fileType) == -1) {
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
that.setData({
loadShow: false
});
return;
}
}
}
if (this.data.infoData.detectionFile != null && detectionFileData.length == 0) {
app.toast("请上传检测报告!")
that.setData({
@ -355,7 +432,7 @@ Page({
})
return;
}
let path=this.data.infoData.detectionFile;
let path = "";
if (detectionFileData.length > 0) {
let _fileType = detectionFileData[0].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
@ -367,17 +444,13 @@ Page({
});
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 trustDeedImages = [];
//其它附件
let attachmentFiles = [];
//检测报告
let detectionFiles = [];
let params = {
id,
checkType,
@ -387,18 +460,84 @@ Page({
qualifiedFlag,
witnessUser,
witnessUserName,
checkTime:checkTime+":00",
checkTime: checkTime,
laboratoryName,
updateBy: loginName,
detectionFile:path,
approveStatus:path==null?null:"1"
approveStatus: that.data.approveStatus == null ? null : "1"
}
let uploadUrl = app.globalData.uploadUrl + '/common/upload';
let uploadName = "file";
trustDeed.forEach(async (item) => {
if (item.indexOf("/profile/") > -1) {
trustDeedImages.push(item.replace(that.data.request, "").replace(".min.jpg", ""));
} else {
let obj = await that.syncUploadImage(uploadUrl, item, uploadName);
trustDeedImages.push(obj.data.fileName)
}
if (trustDeedImages.length == trustDeed.length) {
params.trustDeed = trustDeedImages.toString();
if (attachments.length > 0) {
attachments.forEach(async (file) => {
if (file.path.indexOf("/profile/") > -1) {
attachmentFiles.push(file.path);
} else {
let fObj = await that.syncUploadImage(uploadUrl, file.path, uploadName);
attachmentFiles.push(fObj.data.fileName)
}
if (attachmentFiles.length == attachments.length) {
params.attachment = JSON.stringify(attachmentFiles);
if (detectionFileData.length > 0) {
detectionFileData.forEach(async (df) => {
if (df.path.indexOf("/profile/") > -1) {
detectionFiles.push(df.path);
} else {
let dfObj = await that.syncUploadImage(uploadUrl, df.path, uploadName);
detectionFiles.push(dfObj.data.fileName)
}
if (detectionFileData.length == detectionFiles.length) {
params.detectionFile = detectionFiles.toString();
this.submitForm(params);
}
});
} else {
this.submitForm(params);
}
}
});
} else {
if (detectionFileData.length > 0) {
detectionFileData.forEach(async (df) => {
if (df.path.indexOf("/profile/") > -1) {
detectionFiles.push(df.path);
} else {
let dfObj = await that.syncUploadImage(uploadUrl, df.path, uploadName);
detectionFiles.push(dfObj.data.fileName)
}
if (detectionFileData.length == detectionFiles.length) {
params.detectionFile = detectionFiles.toString();
this.submitForm(params);
}
});
} else {
this.submitForm(params);
}
}
}
});
},
/**
* 提交表单
* @param {*} params
*/
submitForm(params) {
let that = this;
wx.request({
url: app.globalData.reqUrl + '/wechat/projectDetection/edit',
method: "POST",
data: params,
header: {
"Username": loginName,
"Username": that.data.loginName,
"Content-Type": "application/json"
},
success(res) {
@ -416,7 +555,6 @@ Page({
}
}
})
})
},
/**
@ -431,7 +569,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -466,6 +606,24 @@ Page({
})
},
// list 上传图片
onImagesArr(e) {
this.setData({
trustDeed: e.detail
})
},
/**
* 相关附件上传
* @param {*} options
*/
otherFileUpload(options) {
let file = options.detail;
this.setData({
attachments: file
});
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({

View File

@ -3,7 +3,9 @@
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">修改取样复试</view>
@ -36,10 +38,18 @@
</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 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>
@ -68,8 +78,7 @@
<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"/>
<textarea class="add_textarea" placeholder="请填写使用部位" model:value="{{infoData.usePosition}}" placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200" />
</view>
</view>
<view class="inspect_info_list">
@ -88,7 +97,7 @@
<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>
<voucher-date counts="5" placeholder="请选择送检时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkTime}}"></voucher-date>
</view>
</view>
<view class="inspect_info_list">
@ -97,6 +106,18 @@
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" model:value="{{infoData.laboratoryName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检验委托单</view>
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" limit="{{1}}" fileUrlArray="{{trustDeed}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
<view class="inspect_info_content">
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}" fileUrlArray="{{attachments}}"></file-uploader-all>
</view>
</view>
</view>
<view class="inspect_overview" wx:if="{{infoData.detectionFile!=nulll}}">
<view class="safety_inspect_title module_title_flex module_title_padding">
@ -125,51 +146,3 @@
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -29,7 +29,8 @@ Page({
}, {
text: '结束'
}],
active: 100
active: 100,
attachments:[],
},
/**
@ -102,8 +103,22 @@ Page({
}
});
}
let attachments = [];
if (res.data.attachment) {
let files = JSON.parse(res.data.attachment);
if (files && files.length > 0) {
files.forEach(item => {
let it = item.split('/');
attachments.push({
'name': it[it.length - 1],
path: item
});
});
}
}
that.setData({
infoData: res.data,
attachments,
detectionImageList: imageUrls,
minDetectionFileImages: minImageUrls,
detectionFiles: fileNames,
@ -227,6 +242,46 @@ Page({
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
},
//展示图片
showImg2: function (e) {
if (this.data.infoData.trustDeed != null) {
let imgs = this.data.infoData.trustDeed.split(',');
let list = [];
imgs.forEach(item => {
list.push(this.data.request + item);
})
wx.previewImage({
urls: list,
current: imgs[e.currentTarget.dataset.index]
})
}
},
/**
* 下载附件
* @param {*} e
*/
downFile2: function (e) {
let {
path,
} = e.currentTarget.dataset.set
wx.downloadFile({
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
},
fail: function (res) {
console.log(res)
}
})
}
})
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({

View File

@ -1,9 +1,11 @@
<!--pageage/safetyManagement/problemRectification/index.wxml-->
<wxs module="format" src="/utils/format.wxs"></wxs>
<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>
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">取样复试详情</view>
@ -33,10 +35,18 @@
</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 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>
@ -99,6 +109,27 @@
<van-col span="18">{{infoData.laboratoryName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.trustDeed!=null}}">
<van-row>
<van-col span="6"><text class="color_purple">委托单</text></van-col>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{format.split(infoData.trustDeed,',')}}" wx:key="index">
<image bindtap='showImg2' data-index="{{index}}" src="{{request+item+'.min.jpg'}}"></image>
</view>
</view>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
<van-row>
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
<van-col span="18"></van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
<view class="files_parent" wx:for="{{attachments}}" wx:key="index" bindtap="downFile2" data-set="{{item}}">
<text class="color_blue files">{{item.name}}</text>
</view>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
@ -169,4 +200,3 @@
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
</view>
</view>

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/securityCheckGR/index.js
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
@ -58,6 +60,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../../pages/login/index',
})
}
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
@ -87,12 +94,8 @@ Page({
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
}
})
} else {

View File

@ -13,7 +13,7 @@
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}}</text></view>
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}}</text></view>

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/addSafetyInspect/index.js
import {
syncFileUpload
} from '../../../utils/request'
const app = getApp()
Page({
@ -7,7 +9,7 @@ Page({
*/
data: {
maxDate: new Date(2088, 1, 1).getTime(),
currentDate:new Date().getTime(),
minDate: new Date(2001, 1, 1).getTime(),
deptId: "",
projectId: "",
projectName: "",
@ -31,16 +33,35 @@ Page({
dataTypeLvl1List: [],
dataTypeLvl2List: [],
dataTypeLvl2AllList: [],
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 0
list: [{
id: 1,
text: "合格"
}, {
id: 2,
text: "不合格"
}],
flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 0,
checkingFiles: "",
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {projectId,projectName} = options
let {
projectId,
projectName
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -121,7 +142,10 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
})
that.setData({
dataTypeLvl1List: list,
@ -145,7 +169,10 @@ Page({
let tempData = []
res.data.forEach(it => {
if (it.remark == "1") {
tempData.push({"id":it.dictValue,"text":it.dictLabel});
tempData.push({
"id": it.dictValue,
"text": it.dictLabel
});
}
})
that.setData({
@ -172,7 +199,10 @@ Page({
let tempData = []
this.data.dataTypeLvl2AllList.forEach(it => {
if (it.remark == e.detail.id) {
tempData.push({"id":it.dictValue,"text":it.dictLabel});
tempData.push({
"id": it.dictValue,
"text": it.dictLabel
});
}
})
this.setData({
@ -249,7 +279,24 @@ Page({
loadShow: true
})
let that = this
let {projectId,deptId,qualityUser,qualityUserName,superviseUser,superviseUserName,checkWorkingPosition,intro,checkTime,checkingResult,imageInfoData,loginName,userName,dataTypeLvl1,dataTypeLvl2} = that.data;
let {
projectId,
deptId,
qualityUser,
qualityUserName,
superviseUser,
superviseUserName,
checkWorkingPosition,
intro,
checkTime,
checkingResult,
imageInfoData,
loginName,
userName,
dataTypeLvl1,
dataTypeLvl2,
checkingFiles
} = that.data;
//数据效验
if (projectId == "" || deptId == "" || loginName == "") {
app.toast("数据异常,请刷新页面重试!")
@ -321,8 +368,22 @@ Page({
// })
// return;
// }
if (checkingFiles.length > 0) {
for (let i = 0; i < checkingFiles.length; i++) {
let _fileType = checkingFiles[i].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if (this.data.fileType.indexOf(_fileType) == -1) {
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
that.setData({
loadShow: false
});
return;
}
}
}
let fileUrls = [];
let _checkingFiles = [];
imageInfoData.forEach(async (item) => {
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
let name = "file"
@ -346,14 +407,37 @@ Page({
createBy: loginName,
imageUrls: fileUrls.toString(),
dataTypeLvl1,
dataTypeLvl2,
dataTypeLvl2
}
if (checkingFiles.length > 0) {
for (let i = 0; i < checkingFiles.length; i++) {
syncFileUpload(checkingFiles[i].path).then(res => {
_checkingFiles.push(res.fileName);
if (checkingFiles.length == _checkingFiles.length) {
params.checkingFiles = JSON.stringify(_checkingFiles);
this.submitForm(params);
}
});
}
} else {
this.submitForm(params);
}
}
})
},
/**
* 提交表单
* @param {*} params
*/
submitForm(params) {
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectchecking/add',
method: "POST",
data: params,
header: {
"Username": loginName,
"Username": that.data.loginName,
"Content-Type": "application/json"
},
success(res) {
@ -371,8 +455,6 @@ Page({
}
}
})
}
})
},
/**
@ -387,7 +469,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -409,6 +493,17 @@ Page({
})
},
/**
* 相关附件上传
* @param {*} options
*/
otherFileUpload(options) {
let file = options.detail;
this.setData({
checkingFiles: file
});
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({

View File

@ -1,4 +1,4 @@
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="header_title">
<view class="header_title_row">
<van-row>
@ -19,7 +19,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr"></file-uploader>
</view>
</view>
@ -65,9 +65,16 @@
<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"></voucher-datetime>
<voucher-date counts="5" placeholder="请选择验收时间" minDate="{{minDate}}" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
<view class="inspect_info_content">
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}"></file-uploader-all>
</view>
</view>
<view class="inspect_info_list" wx:if="{{false}}">
<view class="inspect_info_title">验收结果</view>
<view class="inspect_info_content">

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/addSafetyInspect/index.js
import {
syncFileUpload
} from '../../../utils/request'
const app = getApp()
Page({
@ -7,7 +9,6 @@ Page({
*/
data: {
maxDate: new Date(2088, 1, 1).getTime(),
currentDate:new Date().getTime(),
deptId: "",
projectId: "",
projectName: "",
@ -35,23 +36,44 @@ Page({
dataTypeLvl1List: [],
dataTypeLvl2List: [],
dataTypeLvl2AllList: [],
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
list: [{
id: 1,
text: "合格"
}, {
id: 2,
text: "不合格"
}],
request: app.globalData.reqUrl,
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 1
flowNodes: [{
text: '开始'
}, {
text: '提交申请'
}, {
text: '监理审批'
}, {
text: '结束'
}],
active: 1,
checkingFiles: "",
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"],
fileUrlArray: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id,dt1} = options
let {
id,
dt1
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success: res => {
this.setData({
id,dt1,
id,
dt1,
projectId: app.globalData.projectId,
projectName: app.globalData.projectName,
deptId: res.data.deptId,
@ -129,7 +151,10 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel});
list.push({
"id": it.dictValue,
"text": it.dictLabel
});
})
that.setData({
dataTypeLvl1List: list,
@ -154,7 +179,10 @@ Page({
res.data.forEach(it => {
console.log(that.data.dt1, "xxxxxxxxxxxxxxxx");
if (it.remark == that.data.dt1) {
tempData.push({"id":it.dictValue,"text":it.dictLabel});
tempData.push({
"id": it.dictValue,
"text": it.dictLabel
});
}
})
that.setData({
@ -181,7 +209,10 @@ Page({
let tempData = []
this.data.dataTypeLvl2AllList.forEach(it => {
if (it.remark == e.detail.id) {
tempData.push({"id":it.dictValue,"text":it.dictLabel});
tempData.push({
"id": it.dictValue,
"text": it.dictLabel
});
}
})
this.setData({
@ -224,7 +255,9 @@ Page({
*
*/
getInfo() {
let {id} = this.data
let {
id
} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectchecking/info',
@ -241,8 +274,22 @@ Page({
imageInfoData.push(that.data.request + element + '.min.jpg');
});
}
let checkingFiles = [];
if (res.data.checkingFiles) {
let files = JSON.parse(res.data.checkingFiles);
if (files && files.length > 0) {
files.forEach(item => {
let it = item.split('/');
checkingFiles.push({
'name': it[it.length - 1],
path: item
});
});
}
}
that.setData({
infoData: res.data,
fileUrlArray: checkingFiles,
dataTypeLvl1: res.data.dataTypeLvl1,
dataTypeLvl2: res.data.dataTypeLvl2,
qualityUser: res.data.qualityUser,
@ -330,7 +377,21 @@ Page({
loadShow: true
})
let that = this
let {id,qualityUser,qualityUserName,superviseUser,superviseUserName,checkWorkingPosition,intro,checkTime,imageInfoData,loginName,dataTypeLvl1,dataTypeLvl2} = that.data;
let {
id,
qualityUser,
qualityUserName,
superviseUser,
superviseUserName,
checkWorkingPosition,
intro,
checkTime,
imageInfoData,
loginName,
dataTypeLvl1,
dataTypeLvl2,
checkingFiles
} = that.data;
//数据效验
if (id == "") {
app.toast("数据异常,请刷新页面重试!")
@ -395,8 +456,22 @@ Page({
})
return;
}
if (checkingFiles.length > 0) {
for (let i = 0; i < checkingFiles.length; i++) {
let _fileType = checkingFiles[i].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
//判断附件类型,如果是图片直接展示,非图片则显示附件
if (that.data.fileType.indexOf(_fileType) == -1) {
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
that.setData({
loadShow: false
});
return;
}
}
}
let fileUrls = [];
let _checkingFiles = [];
imageInfoData.forEach(async (item) => {
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
let name = "file"
@ -424,12 +499,38 @@ Page({
dataTypeLvl1,
dataTypeLvl2,
}
if (checkingFiles.length > 0) {
checkingFiles.forEach(async (file) => {
if (file.path.indexOf('/profile/') > -1) {
_checkingFiles.push(file.path);
} else {
let obj = await that.syncUploadImage(uploadUrl, file.path, name);
_checkingFiles.push(obj.data.fileName);
}
if (checkingFiles.length == _checkingFiles.length) {
params.checkingFiles = JSON.stringify(_checkingFiles);
this.submitForm(params);
}
});
} else {
this.submitForm(params);
}
}
})
},
/**
* 提交表单
* @param {*} params
*/
submitForm(params){
let that = this;
wx.request({
url: app.globalData.reqUrl + '/wechat/projectchecking/edit',
method: "POST",
data: params,
header: {
"Username": loginName,
"Username": that.data.loginName,
"Content-Type": "application/json"
},
success(res) {
@ -447,8 +548,6 @@ Page({
}
}
})
}
})
},
/**
@ -463,7 +562,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -492,6 +593,17 @@ Page({
})
},
/**
* 相关附件上传
* @param {*} options
*/
otherFileUpload(options) {
let file = options.detail;
this.setData({
checkingFiles: file
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -49,7 +49,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
</view>
</view>
@ -95,7 +95,13 @@
<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>
<voucher-date counts="5" placeholder="请选择验收时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkingDate}}"></voucher-date>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
<view class="inspect_info_content">
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}" fileUrlArray="{{fileUrlArray}}"></file-uploader-all>
</view>
</view>
</view>

View File

@ -25,7 +25,8 @@ Page({
}, {
text: '结束'
}],
active: 100
active: 100,
checkingFiles:[]
},
/**
@ -78,16 +79,27 @@ Page({
})
let urls = [];
let minUrls = [];
let checkingFiles = [];
if (res.data.imageUrls) {
res.data.imageUrls.split(',').forEach(element => {
urls.push(that.data.request + element);
minUrls.push(that.data.request + element + '.min.jpg');
});
}
if(res.data.checkingFiles){
let files = JSON.parse(res.data.checkingFiles);
if(files && files.length>0){
files.forEach(item =>{
let it = item.split('/');
checkingFiles.push({'name':it[it.length-1],path:item});
});
}
}
that.setData({
infoData: res.data,
imageList: urls,
minImageList: minUrls,
checkingFiles,
loadShow: false
})
//判断当前能否删除
@ -194,6 +206,31 @@ Page({
})
},
/**
* 下载附件
* @param {*} e
*/
downFile: function (e) {
let {
path,
} = e.currentTarget.dataset.set
wx.downloadFile({
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
},
fail: function (res) {
console.log(res)
}
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -116,13 +116,24 @@
<van-col span="18">{{infoData.checkingDate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
<van-row>
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
<van-col span="18"></van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
<view class="files_parent" wx:for="{{checkingFiles}}" wx:key="index" bindtap="downFile" data-set="{{item}}">
<text class="color_blue files">{{item.name}}</text>
</view>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
<van-row>
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
<van-col span="18">
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 10rpx 40rpx;font-size: 25rpx;">待审批</text>
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 10rpx 40rpx;font-size: 25rpx;">合格</text>
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 10rpx 40rpx;font-size: 25rpx;">不合格</text>
</van-col>
</van-row>
</view>

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/securityCheckGR/index.js
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
@ -64,6 +66,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../../pages/login/index',
})
}
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
@ -93,6 +100,8 @@ Page({
id: app.globalData.projectId
}
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
},
fail: err => {
//未获取用户信息时,重新登录

View File

@ -13,7 +13,7 @@
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}}</text></view>
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}}</text></view>

View File

@ -38,7 +38,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险合同
<text style="font-size: small;">[仅可上传PDF格式]</text>
</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
</view>
</view>

View File

@ -19,7 +19,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" data-index="{{0}}"></file-uploader>
</view>
</view>
@ -65,13 +65,13 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">会签单图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArrSignFiles" data-index="{{1}}" limit="{{limit}}"></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">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArrAlterationFiles" data-index="{{2}}" limit="{{limit}}"></file-uploader>
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
</view>

View File

@ -48,7 +48,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" data-index="{{0}}" fileUrlArray="{{imageInfoData}}"></file-uploader>
</view>
</view>
@ -94,13 +94,13 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">会签单图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<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">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArrAlterationFiles" data-index="{{2}}" limit="{{1}}" fileUrlArray="{{alterationFileData}}"></file-uploader>
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
</view>

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/securityCheckGR/index.js
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
@ -49,6 +51,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../../pages/login/index',
})
}
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
@ -78,12 +85,8 @@ Page({
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
}
})
} else {

View File

@ -13,7 +13,7 @@
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}}</text></view>
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}}</text></view>

View File

@ -19,7 +19,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr"></file-uploader>
</view>
</view>
@ -80,7 +80,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
</view>
</view>

View File

@ -48,7 +48,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
</view>
</view>
@ -101,7 +101,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}" fileUrlArray="{{filesData}}"></file-uploader-all>
</view>
</view>

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/securityCheckGR/index.js
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
@ -51,6 +53,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../../pages/login/index',
})
}
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
@ -80,12 +87,8 @@ Page({
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
}
})
} else {

View File

@ -13,7 +13,7 @@
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}}</text></view>
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}}</text></view>

View File

@ -19,7 +19,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr"></file-uploader>
</view>
</view>

View File

@ -1,4 +1,6 @@
// pageage/safetyManagement/securityCheckGR/index.js
import {
getToken
} from '../../../../utils/auth'
const app = getApp()
Page({
@ -64,6 +66,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../../../pages/login/index',
})
}
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
@ -93,12 +100,8 @@ Page({
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
}
})
} else {

View File

@ -13,7 +13,7 @@
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='zg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>整改({{dzgCount}}</text></view>
<view class="{{activeState=='fj'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>复检({{dfjCount}}</text></view>
@ -57,7 +57,7 @@
</view>
<view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;">
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view>
</view>
</view>

View File

@ -19,7 +19,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr"></file-uploader>
</view>
</view>

View File

@ -1,7 +1,8 @@
// pageage/safetyManagement/securityCheckGR/index.js
import {
getToken
} from '../../../../utils/auth'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
@ -57,6 +58,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../../../pages/login/index',
})
}
if (options && options.barProId) {
//数据未加载完毕,从文件读取数据
if (app.globalData.projectInfoList.length == 0) {
@ -86,12 +92,8 @@ Page({
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
}
})
} else {

View File

@ -11,7 +11,7 @@
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='zg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>整改({{dzgCount}}</text></view>
<view class="{{activeState=='fj'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>复检({{dfjCount}}</text></view>
@ -56,7 +56,7 @@
</view>
<view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;">
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view>
</view>
</view>

View File

@ -18,7 +18,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">形象进度图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" fileUrlArray="{{uploadImages}}"
></file-uploader>
</view>

View File

@ -56,7 +56,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">证书附件
<text style="font-size: small;">[可上传PDF和图片格式]</text>
</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
</view>
</view>

View File

@ -1,4 +1,4 @@
// pageage/safetyManagement/addSafetyInspect/index.js
import jsonConfig from '../../../utils/json'
const app = getApp()
Page({
@ -15,14 +15,22 @@ Page({
standardType: "1",
standardTypeList: [],
info: "",
standardDesc:""
standardDesc: "",
standardNotes:[],
showPopup:false,
showDetailsName:"",
activeId:null,
mainActiveIndex:0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {projectId,projectName} = options
let {
projectId,
projectName
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -34,10 +42,59 @@ Page({
loginName: res.data.loginName
})
this.getStandardTypeList();
this.initStandardTypeListNotes(this.data.standardType);
}
})
},
/**
* 初始化标准类型
*/
initStandardTypeListNotes(type) {
let index = type - 1;
this.setData({
activeId: null,
mainActiveIndex: 0,
showDetailsName: "",
standardNotes:jsonConfig.standardTypeListNotes[index]
})
},
//关闭申请明细选择
onShowPopup(e) {
this.setData({
showPopup: true
})
},
//关闭申请明细选择
onClosePopup(e) {
this.setData({
showPopup: false
})
},
/**
* 栏目触发事件
*/
onClickNav(e) {
this.setData({
activeId: null,
mainActiveIndex: e.detail.index
})
},
/**
* 选项触发事件
*/
onClickItem(e) {
this.setData({
activeId:e.detail.id,
showDetailsName: e.detail.text
})
this.onClosePopup();
},
getStandardTypeList() {
let that = this
wx.request({
@ -52,7 +109,11 @@ Page({
if (res.code == 200) {
let list = [];
res.data.forEach(it => {
list.push({"id":it.dictValue,"text":it.dictLabel,"info":it.remark});
list.push({
"id": it.dictValue,
"text": it.dictLabel,
"info": it.remark
});
})
that.setData({
standardTypeList: list,
@ -92,7 +153,15 @@ Page({
loadShow: true
})
let that = this
let {projectId,loginName, deptId,standardType,standardDesc,imageInfoData} = that.data;
let {
projectId,
loginName,
deptId,
standardType,
standardDesc,
imageInfoData,
activeId
} = that.data;
//数据效验
if (projectId == "" || loginName == "" || deptId == "") {
app.toast("数据异常,请刷新页面重试!")
@ -101,15 +170,22 @@ Page({
})
return;
}
if(imageInfoData.length==0){
app.toast("请上传标准图片!")
if (standardType == "") {
app.toast("请选择标准类型!")
that.setData({
loadShow: false
})
return;
}
if(standardType==""){
app.toast("请选择标准类型!")
if(!activeId){
app.toast("请选择类型明细!")
that.setData({
loadShow: false
})
return;
}
if (imageInfoData.length == 0) {
app.toast("请上传标准图片!")
that.setData({
loadShow: false
})
@ -135,7 +211,7 @@ Page({
projectId,
deptId,
imageFile: fileUrls.toString(),
standardType,
standardType:activeId,
standardDesc,
ord: 1,
createBy: loginName
@ -179,7 +255,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -201,12 +279,13 @@ Page({
})
},
//选择测量类型
//选择项目标准类型
onSelectStandardType(e) {
this.setData({
standardType: e.detail.id,
info: e.detail.info
})
this.initStandardTypeListNotes(e.detail.id);
},
returnToPage: function () {

View File

@ -1,6 +1,8 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index"
"van-overlay": "@vant/weapp/overlay/index",
"van-popup": "@vant/weapp/popup",
"van-tree-select": "@vant/weapp/tree-select/index"
},
"navigationStyle":"custom"
}

View File

@ -3,7 +3,9 @@
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">新增项目标准</view>
@ -25,17 +27,26 @@
<text class="color_blue">{{info}}</text>
</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" value="{{showDetailsName}}" bindtap="onShowPopup" />
<van-popup show="{{ showPopup }}" bind:close="onClosePopup" position="bottom" round="5">
<van-tree-select items="{{ standardNotes }}" main-active-index="{{ mainActiveIndex }}" active-id="{{ activeId }}" bind:click-nav="onClickNav" bind:click-item="onClickItem">
</van-tree-select>
</van-popup>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">标准图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" limit="{{1}}"></file-uploader>
</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;" bindinput="onInputStandardDesc" maxlength="200"/>
<textarea class="add_textarea" placeholder="请填写图片描述" placeholder-style="color:#6777aa;" bindinput="onInputStandardDesc" maxlength="200" />
</view>
</view>
</view>
@ -51,51 +62,3 @@
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -1,7 +1,99 @@
/* 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
}
.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;
}
.text_active{
padding-left: 5rpx;
color: #8369f5;
}
.van-sidebar{
background-color: #212737!important;
}
.van-sidebar-item{
color: #EFEFEF!important;
background-color: #212737!important;
}
.van-sidebar-item--selected{
border-color:var(--sidebar-selected-border-color,#8369f5)!important;
background-color: #252d41 !important;
color: #83a5ef !important;
}
.van-tree-select__content{
background-color:#252d41 !important;
}
.van-tree-select__item--active {
color: var(--tree-select-item-active-color,#8369f5) !important;
}
.van-tree-select{
height: 800rpx !important;
}
.van-popup.van-popup--bottom {
margin-bottom: -55rpx !important;
}

View File

@ -1,4 +1,7 @@
// pageage/project_checking/info/index.js
import jsonConfig from '../../../utils/json'
import {
getDictCache
} from '../../../api/publics'
const app = getApp()
Page({
@ -7,6 +10,7 @@ Page({
*/
data: {
id: "",
type: "",
infoData: {},
loadShow: false,
loginName: "",
@ -14,35 +18,62 @@ Page({
showDel: false,
imageList: [],
minImageList: [],
request:app.globalData.reqUrl
request: app.globalData.reqUrl,
standardTypeName: "",
standardTypeRemark: "",
standardNotesName: "",
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {id} = options
let {
id,
standardType
} = options
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success: res => {
this.setData({
id,
type: standardType.substring(0, 1),
loginName: res.data.loginName,
projectName: app.globalData.projectName
})
this.getDicts();
this.getInfo();
}
})
},
//获取字典信息
getDicts() {
let that = this;
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
getDictCache('prj_standard_type').then(res => {
if (res.code == 200) {
res.data.forEach(item => {
if (item.dictValue == that.data.type) {
that.setData({
standardTypeName: item.dictLabel,
standardTypeRemark: item.remark
})
}
})
}
});
},
/**
* 获取安全检查详情信息
*
*/
getInfo() {
let {id} = this.data
let {
id
} = this.data
let that = this
wx.request({
url: app.globalData.reqUrl + '/wechat/projectStandard/info',
@ -61,6 +92,26 @@ Page({
minUrls.push(that.data.request + element + '.min.jpg');
});
}
if (that.data.type != res.data.standardType) {
let index = that.data.type - 1;
jsonConfig.standardTypeListNotes[index].forEach(it => {
if (it.children && it.children.length > 0) {
it.children.forEach(i => {
if (i.id == res.data.standardType) {
that.setData({
standardNotesName: i.text
})
}
})
} else {
if (it.id == res.data.standardType) {
that.setData({
standardNotesName: it.text
})
}
}
});
}
that.setData({
infoData: res.data,
imageList: urls,
@ -68,7 +119,7 @@ Page({
loadShow: false
})
//判断当前能否删除
if(res.data.createBy!=that.data.loginName){
if (res.data.createBy == that.data.loginName) {
that.setData({
showDel: true
})
@ -95,7 +146,9 @@ Page({
})
},
deleteData() {
let {id} = this.data
let {
id
} = this.data
let that = this;
wx.request({
url: app.globalData.reqUrl + '/wechat/projectStandard/remove',

View File

@ -21,10 +21,16 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">标准类型</text></van-col>
<van-col span="18" class="color_blue">{{infoData.standardTypeName}}</van-col>
<van-col span="18" class="color_blue">{{standardTypeName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list color_blue">{{standardTypeRemark}}</view>
<view class="inspect_overview_list" wx:if="{{type != infoData.standardType}}">
<van-row>
<van-col span="6"><text class="color_purple">类型明细</text></van-col>
<van-col span="18" class="color_blue">{{standardNotesName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list color_blue">{{infoData.standardTypeRemark}}</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">标准图片</text></van-col>

View File

@ -63,10 +63,10 @@ Page({
getInfo(e) {
let {
id
id,standardType
} = e.currentTarget.dataset.set
wx.redirectTo({
url: `../info/index?id=${id}`
url: `../info/index?id=${id}&standardType=${standardType}`
})
},
@ -79,7 +79,11 @@ Page({
standard = options.standard;
app.globalData.standard = options.standard;
} else {
if(app.globalData.standard){
standard = app.globalData.standard;
}else{
standard = 1;
}
}
//获取缓存数据
wx.getStorage({

View File

@ -18,7 +18,7 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">{{minTitle}}图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" limit="{{limit}}"></file-uploader>
</view>
</view>
@ -57,7 +57,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">相关文件
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
</view>
</view>
@ -77,7 +77,7 @@
<view class="max_tab_name">
<view class="option_list_title">
<view class="option_list_title_btn" bindtap="onCloseDept">取消</view>
<view>请选择协作团队</view>
<view style="color: #BBB;">请选择协作团队</view>
<view class="option_list_title_btn" bindtap="onCloseDept">确认</view>
</view>
<view wx:for="{{projectDeptList}}" wx:key="index" data-index="{{index}}" bindtap="changeDept" data-name="{{item.deptName}}" data-id="{{item.deptId}}" class="font_color {{ item.state=='1' ? 'active' :' '}}">{{item.deptName}}</view>

View File

@ -36,20 +36,20 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 30rpx 0 20rpx;">存在问题</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<input placeholder="请填写" placeholder-style="color:#6777aa;" class="inspect_input_fill_in"
value="{{item.existing_problems}}" bindinput="onPositionInput" data-index="{{index}}"/>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">检查图片</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<file-uploader bindimages="onImagesArr" data-index="{{index}}" fileUrlArray="{{item.image_upload}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 30rpx 0 20rpx;">整改责任人</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<select-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddResponsible" data-index="{{index}}" choose="{{item.person_responsible}}"></select-person>
<!-- <view class="nspect_info_rectifier">
<van-row>

View File

@ -0,0 +1,218 @@
import {
removeToken
} from '../../utils/auth'
import {
codeUpdatePwd,
sendPhoneMessage
} from '../../api/login'
const app = getApp();
const timer = null;
Page({
/**
* 页面的初始数据
*/
data: {
isSend: false,
count: 120,
timer: null,
butText: "发送验证码",
username: "",
password: "",
pw: "",
code: "",
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.resetCountdown();
},
returnToPage: function () {
wx.redirectTo({
url: '../login/index',
})
},
//获取填写的账号信息
name: function (even) {
this.setData({
username: even.detail.value
})
},
//获取填写的密码信息
pass: function (even) {
this.setData({
password: even.detail.value
})
},
//获取填写的密码信息
rpass: function (even) {
this.setData({
pw: even.detail.value
})
},
//获取填写的密码信息
code: function (even) {
this.setData({
code: even.detail.value
})
},
/**
* 发送验证码
*/
sendCode() {
if (!this.data.isSend) {
if (this.data.username && this.data.username.length == 11) {
sendPhoneMessage(this.data.username).then(res => {
if (res.code == 200 && res.data) {
app.toast("已发送验证码请注意查收。5分钟内有效", 1200);
this.startCountdown();
} else {
app.toast("请稍后再试!", 1200);
}
});
} else {
app.toast("请输入正确的手机号码!");
}
}
},
startCountdown() {
this.setData({
isSend: true,
butText: this.data.count + "秒后发送",
})
this.timer = setInterval(() => {
let can = this.data.count - 1;
if (can <= 0) {
console.log(can, "xxxxxxxxxxxxxxx");
clearInterval(this.timer);
this.resetCountdown();
} else {
this.setData({
isSend: true,
count: can,
butText: can + "秒后发送",
})
}
}, 1000);
},
resetCountdown() {
this.setData({
isSend: false,
count: 20,
butText: "发送验证码",
})
if (this.timer) {
clearInterval(this.timer);
}
},
//修改密码
alertPass: function () {
let {
username,
password,
pw,
code
} = this.data;
var that = this;
if (username == "") {
app.toast("手机账号不能为空");
return;
}
if (code == "") {
app.toast("验证码不能为空");
return;
}
if (password == "") {
app.toast("登录密码不能为空");
return;
}
if (pw == "") {
app.toast("确认密码不能为空");
return;
}
if (pw != password) {
app.toast("登录密码和确认密码不一致");
return;
}
let data = {
loginName: username,
password: password,
confPass: pw,
code: code,
source: "r",
};
codeUpdatePwd(data).then(res => {
if (res.code == 200) {
app.toast("密码修改成功!",800);
removeToken();
wx.clearStorageSync();
wx.setStorageSync('isReload', "1");
setTimeout(()=>{
wx.redirectTo({
url: '../login/index',
});
},500)
}
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle":"custom"
}

View File

@ -0,0 +1,47 @@
<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="vis">
<view class="login_title">
<text>产发工程数字管理平台</text>
</view>
<view class="login_bg">
<view class="login_ex">手机验证修改密码</view>
<view class="login_input">
<input placeholder="输入登录手机" placeholder-style="color:#5e6ea2" bindinput="name" class="name" maxlength="11" />
</view>
<van-row>
<van-col span="14">
<view class="login_input">
<input placeholder="请输入验证码" placeholder-style="color:#5e6ea2" bindinput="code" class="code" maxlength="6" />
</view>
</van-col>
<van-col span="10">
<view class="login_code">
<view class="{{isSend?'code_btn_dis':'code_btn'}}" bindtap="sendCode">{{butText}}</view>
</view>
</van-col>
</van-row>
<view class="login_input">
<input placeholder="输入登录密码" placeholder-style="color:#5e6ea2" password="true" class="pass" bindinput="pass" />
</view>
<view class="login_input">
<input placeholder="输入确认密码" placeholder-style="color:#5e6ea2" password="true" class="pass" bindinput="rpass" />
</view>
</view>
<view class="login_btn" bindtap="alertPass">
确 定 修 改 密 码
</view>
</view>

View File

@ -0,0 +1,139 @@
/* pages/login/index.wxss */
page {
background: #191d28 url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
}
.vis{
padding: 166rpx 0 0;
}
.login_title {
height: 180rpx;
line-height: 180rpx;
color: #DDDDDD;
font-size: 41rpx;
font-weight: bold;
text-align: center;
background: url("https://szgcwx.jhncidg.com/staticFiles/img/yanzhu_title.png") no-repeat left/100% 100%;
}
.login_title text {
border-bottom: 3px solid #728ce3;
}
.login_bg {
border-radius: 20rpx;
margin: 0 40rpx;
padding: 25rpx 40rpx;
margin-top: 10rpx;
}
.login_dl {
color: #728ce3;
font-size: 40rpx;
font-weight: bold;
}
.login_ex {
padding: 20rpx 0;
font-size: 30rpx;
border-bottom: 20rpx dashed #728ce3;
width: 50%;
}
.login_input {
margin-top: 50rpx;
}
.login_input .name {
background: url("https://szgcwx.jhncidg.com/staticFiles/img/login_name.png") no-repeat left/40rpx;
border-bottom: 1px solid #5e6ea2;
height: 100rpx;
width: 85%;
color: #728ce3;
padding: 0 50rpx;
}
.login_btn {
margin: 40rpx 60rpx 60rpx 60rpx;
height: 80rpx;
background-image: linear-gradient(#5b9fff, #7655fc);
border-radius: 80rpx;
text-align: center;
line-height: 80rpx;
}
.login_btn:active {
background-image: linear-gradient(#7655fc, #5b9fff);
}
.code_btn{
margin-top: 70rpx;
margin-left: 18rpx;
height: 80rpx;
background-image: linear-gradient(#5b9fff, #7655fc);
text-align: center;
line-height: 80rpx;
}
.code_btn:active {
background-image: linear-gradient(#7655fc, #5b9fff);
}
.code_btn_dis{
margin-top: 70rpx;
margin-left: 18rpx;
height: 80rpx;
background-color: #cccccc;
text-align: center;
line-height: 80rpx;
color: #666666;
}
.login_logo {
width: 100%;
height: 100rpx;
text-align: center;
}
.login_logo image {
height: 70rpx;
margin-top: 30rpx;
}
.login_input .pass {
background: url("https://szgcwx.jhncidg.com/staticFiles/img/login_pass.png") no-repeat left/40rpx;
border-bottom: 1px solid #5e6ea2;
height: 100rpx;
width: 85%;
color: #728ce3;
padding: 0 50rpx;
}
.login_input .code {
background: url("https://szgcwx.jhncidg.com/staticFiles/img/login_code.png") no-repeat left/40rpx;
border-bottom: 1px solid #5e6ea2;
height: 100rpx;
width: 74%;
color: #728ce3;
padding: 0 50rpx;
}
.login_code image {
margin-top: 50rpx;
margin-left: 12rpx;
width: 100%;
height: 100rpx;
}
.lv {
height: 80rpx;
line-height: 80rpx;
color: #728ce3;
}
.lv-r {
text-align: right;
}
.pc {
text-align: center;
color: #5e6ea2;
}

View File

@ -47,7 +47,7 @@
height:180rpx;
border: 1px dashed #28345a;
border-radius: 10rpx;
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/img/WEB_162F576788AE44F08ADDFFC06CD5923F.png") no-repeat center/70%;
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/icon/f3.png") no-repeat center/70%;
}
.in-img-div image{
width: 180rpx;

View File

@ -50,7 +50,7 @@
height:180rpx;
border: 1px dashed #28345a;
border-radius: 10rpx;
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/img/WEB_162F576788AE44F08ADDFFC06CD5923F.png") no-repeat center/70%;
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/icon/WF1.png") no-repeat center/70%;
}
.in-img-div image{
width: 180rpx;

View File

@ -129,5 +129,13 @@ Component({
}
});
},
/**
* 重新加载项目列表
*/
load:function(){
this.setData({
projectList: app.globalData.projectInfoList,
})
}
}
})

View File

@ -10,7 +10,7 @@
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
<view class="option_list_title">
<view class="option_list_title_btn" bindtap="onClose">取消</view>
<view style="text-align: center;"><input placeholder="请输入项目名称搜索" style="width: 280rpx;" bindinput="findProject" value="{{findProjectValue}}" /></view>
<view style="text-align: center;"><input placeholder="请输入项目名称搜索" placeholder-style="color:#638fbd;" style="width: 280rpx;" bindinput="findProject" value="{{findProjectValue}}" /></view>
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
</view>
<van-picker columns="{{ columns }}" bind:change="onSelectChange" custom-class="time_select_style" default-index="{{ index }}" column-class="time_list_style" active-class="time_active_style" toolbar-class="toolbar_style" visible-item-count="5" />

View File

@ -3,6 +3,7 @@ import {
} from '../../../utils/auth'
import {
loginOut,
updatePwd,
findOpenUserMsgId
} from '../../../api/login'
@ -190,33 +191,26 @@ Component({
app.toast("请输入确认密码长度 [6-20]位字符!");
return;
}
wx.request({
header: {
'content-type': 'application/x-www-form-urlencoded'
},
url: app.globalData.reqUrl + '/wechat/updatePassword',
data: {
let data = {
loginName: that.data.loginName,
oldPsw: that.data.oldPsw,
newPsw: that.data.newPsw,
password: that.data.password
},
method: "POST",
success: function (res) {
if (res.data && res.data.data == "200") {
oldPass: that.data.oldPsw,
password: that.data.newPsw,
confPass: that.data.password,
source:"u"
}
updatePwd(data).then(res =>{
if(res.code==200){
app.toast("密码修改成功,请重新登录!",800);
removeToken();
wx.clearStorageSync();
wx.setStorageSync('isReload', "1");
app.toast("密码修改成功!");
setTimeout(()=>{
wx.redirectTo({
url: '../login/index',
});
} else {
app.toast(res.data.info);
return;
},500)
}
}
})
});
},
}
})

View File

@ -41,7 +41,6 @@ Component({
* 组件的初始数据
*/
data: {
show: false,
forData:[],
echoData:[],
@ -60,7 +59,7 @@ Component({
onSelectChange(e){
var data = this.data.forData
var index = e.currentTarget.dataset.index
if(data[index].type == false){
if(data[index].type === undefined || data[index].type == false){
data[index].type = true
}else{
data[index].type = false

View File

@ -16,7 +16,7 @@
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
<view class="option_list_title">
<view class="option_list_title_btn" bindtap="onClose">取消</view>
<view>{{placeholder}}</view>
<view style="color: #BBB;">{{placeholder}}</view>
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
</view>
<view class="option_list_max">

View File

@ -48,7 +48,7 @@
line-height: 90rpx;
}
.option_list_list.active{
color: #ffffff;
color: #06d4f8;
}

View File

@ -31,10 +31,7 @@ Page({
let projectName = e.detail.text;
app.globalData.projectId = projectId;
app.globalData.projectName = projectName;
this.setData({
projectId:projectId,
projectName:projectName
})
this.onLoad();
},
/**

View File

@ -476,14 +476,14 @@ Page({
if(that.data.userInfo.minRoleId<4){
if(deptId=="0"){
//存入文件中
wx.setStorageSync({
wx.setStorage({
key: 'projectInfoList',
data: res.data
});
}
}else{
//存入文件中
wx.setStorageSync({
wx.setStorage({
key: 'projectInfoList',
data: res.data
});

View File

@ -36,6 +36,15 @@ Page({
})
},
/**
* 忘记密码
*/
updatePs(){
wx.redirectTo({
url: '../alter-ps/index',
})
},
//获取填写的密码信息
code: function (even) {
this.setData({
@ -153,6 +162,7 @@ Page({
}
} else {
that.onClickHide();
app.toast(res.data.msg, 2000);
}
}
})
@ -180,11 +190,11 @@ Page({
var password = that.data.password;
var usercode = this.data.usercode;
if (username == "") {
app.toast("账号不能为空");
app.toast("登录账号不能为空");
return;
}
if (password == "") {
app.toast("密码不能为空");
app.toast("登录密码不能为空");
return;
}
if (usercode == "") {
@ -199,31 +209,23 @@ Page({
return;
}
}
//启动蒙版
that.onClickShow();
//发送请求
wx.request({
url: app.globalData.reqUrl + '/wechat/login',
data: {
let params = {
"username": username,
"password": password,
"openId": openId,
"code": usercode,
"uuid": this.data.uuid,
},
method: "POST",
success(res) {
//关闭蒙版
that.onClickHide();
if (res.data.code == '200') {
};
login(params).then(res => {
if (res.code == 200) {
//把数据存到缓存中
wx.setStorage({
key: 'userinfo',
data: res.data.data.userinfo
data: res.data.userinfo
});
setToken(res.data.token);
let rd = res.data.data;
setToken(res.token);
wx.setStorageSync('isReload', "");
let rd = res.data;
//只有一个项目时直接跳转详情页
if (rd.projectInfo != null || rd.projectInfo != undefined) {
//赋值到公共参数
@ -250,10 +252,7 @@ Page({
}
}else{
that.loadCodeImage();
app.toast(res.data.msg,1000);
}
}
})
});
},
})

View File

@ -25,12 +25,23 @@
</view>
</van-col>
</van-row>
<view class="lv" wx:if="{{true}}">
<van-row>
<van-col span="12">
<text style="color:#191d28;">验证码登录</text>
</van-col>
<van-col span="12" class="lv-r">
<van-icon name="question" /><text bindtap="updatePs">忘记密码?立即修改</text>
</van-col>
</van-row>
</view>
</view>
<view class="login_btn" bindtap="userLogin">
确 定
</view>
<view class="pc">电脑端登陆 https://szgc.jhncidg.com</view>
<van-overlay show="{{show}}">
<view class="gif">
<image src="../../images/loding2.gif"></image>

View File

@ -2,6 +2,7 @@
page {
background: #191d28 url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
}
.login_title {
height: 180rpx;
line-height: 180rpx;
@ -11,54 +12,63 @@ page{
text-align: center;
background: url("https://szgcwx.jhncidg.com/staticFiles/img/yanzhu_title.png") no-repeat left/100% 100%;
}
.login_title text {
border-bottom: 3px solid #728ce3;
}
.login_bg {
border-radius: 20rpx;
margin: 0 40rpx;
padding: 25rpx 40rpx;
margin-top: 10rpx;
}
.login_dl {
color: #728ce3;
font-size: 40rpx;
font-weight: bold;
}
.login_ex {
padding: 20rpx 0;
font-size: 30rpx;
border-bottom: 20rpx dashed #728ce3;
width: 50%;
}
.login_input {
margin-top: 50rpx;
}
.login_input .name {
background: url("https://szgcwx.jhncidg.com/staticFiles/img/login_name.png") no-repeat left/40rpx;
border-bottom: 1px solid #5e6ea2;
height: 100rpx;
width: 93%;
width: 85%;
color: #728ce3;
padding: 0 50rpx;
}
.login_btn {
margin:80rpx;
margin: 20rpx 60rpx 60rpx 60rpx;
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;
background-image: linear-gradient(#7655fc, #5b9fff);
}
.login_logo {
width: 100%;
height: 100rpx;
text-align: center;
}
.login_logo image {
height: 70rpx;
margin-top: 30rpx;
@ -89,8 +99,17 @@ page{
height: 100rpx;
}
.lv {
height: 80rpx;
line-height: 80rpx;
color: #728ce3;
}
.lv-r {
text-align: right;
}
.pc {
text-align: center;
color: #5e6ea2;
}

View File

@ -697,14 +697,14 @@ Page({
if(that.data.userInfo.minRoleId<4){
if(deptId=="0"){
//存入文件中
wx.setStorageSync({
wx.setStorage({
key: 'projectInfoList',
data: res.data
});
}
}else{
//存入文件中
wx.setStorageSync({
wx.setStorage({
key: 'projectInfoList',
data: res.data
});

View File

@ -21,7 +21,8 @@ Page({
result:"1",
comment:"",
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
active: 3
active: 3,
attachments:[]
},
/**
@ -79,8 +80,22 @@ Page({
}
});
}
let attachments = [];
if (res.data.attachment) {
let files = JSON.parse(res.data.attachment);
if (files && files.length > 0) {
files.forEach(item => {
let it = item.split('/');
attachments.push({
'name': it[it.length - 1],
path: item
});
});
}
}
that.setData({
infoData:res.data,
attachments,
detectionImageList:imageUrls,
minDetectionFileImages:minImageUrls,
detectionFiles:fileNames,
@ -246,6 +261,46 @@ Page({
})
},
//展示图片
showImg2: function (e) {
if (this.data.infoData.trustDeed != null) {
let imgs = this.data.infoData.trustDeed.split(',');
let list = [];
imgs.forEach(item => {
list.push(this.data.request + item);
})
wx.previewImage({
urls: list,
current: imgs[e.currentTarget.dataset.index]
})
}
},
/**
* 下载附件
* @param {*} e
*/
downFile2: function (e) {
let {
path,
} = e.currentTarget.dataset.set
wx.downloadFile({
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
},
fail: function (res) {
console.log(res)
}
})
}
})
},
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({

View File

@ -1,4 +1,4 @@
<!--pageage/safetyManagement/problemRectification/index.wxml-->
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="header_title">
<view class="header_title_row">
<van-row>
@ -99,6 +99,27 @@
<van-col span="18">{{infoData.laboratoryName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.trustDeed!=null}}">
<van-row>
<van-col span="6"><text class="color_purple">委托单</text></van-col>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{format.split(infoData.trustDeed,',')}}" wx:key="index">
<image bindtap='showImg2' data-index="{{index}}" src="{{request+item+'.min.jpg'}}"></image>
</view>
</view>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
<van-row>
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
<van-col span="18"></van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
<view class="files_parent" wx:for="{{attachments}}" wx:key="index" bindtap="downFile2" data-set="{{item}}">
<text class="color_blue files">{{item.name}}</text>
</view>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">提交单位</text></van-col>

View File

@ -17,7 +17,8 @@ Page({
result:"1",
comment:"",
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
active: 2
active: 2,
checkingFiles:[]
},
/**
@ -58,16 +59,27 @@ Page({
if(res.code == 200){
let urls = [];
let minUrls = [];
let checkingFiles=[];
if(res.data.imageUrls){
res.data.imageUrls.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
}
if(res.data.checkingFiles){
let files = JSON.parse(res.data.checkingFiles);
if(files && files.length>0){
files.forEach(item =>{
let it = item.split('/');
checkingFiles.push({'name':it[it.length-1],path:item});
});
}
}
that.setData({
infoData:res.data,
imageList:urls,
minImageList:minUrls,
checkingFiles,
loadShow:false
})
}

View File

@ -3,7 +3,9 @@
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">举牌验收审批</view>
@ -33,10 +35,18 @@
</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 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>
@ -106,6 +116,17 @@
<van-col span="18">{{infoData.checkingDate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
<van-row>
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
<van-col span="18"></van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
<view class="files_parent" wx:for="{{checkingFiles}}" wx:key="index" bindtap="downFile" data-set="{{item}}">
<text class="color_blue files">{{item.name}}</text>
</view>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
<van-row>
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
@ -145,8 +166,7 @@
<view class="inspect_info_list">
<view class="inspect_info_title">审批意见</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写审批意见200字内"
placeholder-style="color:#6777aa;" bindinput="onInputValue" maxlength="200"/>
<textarea class="add_textarea" placeholder="请填写审批意见200字内" placeholder-style="color:#6777aa;" bindinput="onInputValue" maxlength="200" />
</view>
</view>
<view class="problem_submit_to">
@ -162,4 +182,3 @@
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -1,4 +1,7 @@
import config from '../../../config'
import {
getDictCache
} from '../../../api/publics'
const app = getApp()
Page({
@ -34,14 +37,19 @@ Page({
imageType:["png","jpg","jpeg"],
fileType:["pdf"],
active: 100,
rejectNode:false
rejectNode:false,
subDeptTypes: [],
subDeptScopes: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {deployId,procInsId,procDefName,deptName,nickName,taskId,taskName,projectName} = options
let {deployId,procInsId,procDefName,deptName,nickName,taskId,taskName,projectName,procDefKey} = options
if (procDefKey == "flow_fbzzsp_fbszzsp") {
this.getDicts();
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -67,6 +75,40 @@ Page({
})
},
//获取字典信息
getDicts() {
let that = this;
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
getDictCache('flow_sub_dept_type').then(res => {
if (res.code == 200) {
let typeList = [];
res.data.forEach(item => {
typeList.push({
"id": item.dictValue,
"text": item.dictLabel
});
})
that.setData({
subDeptTypes: typeList
})
}
});
getDictCache('flow_sub_dept_scope').then(res => {
if (res.code == 200) {
let scopeList = [];
res.data.forEach(item => {
scopeList.push({
"id": item.dictValue,
"text": item.dictLabel
});
})
that.setData({
subDeptScopes: scopeList
})
}
});
},
getFlowNode(val){
let flowNodeList = this.data.flowNodeList;
for(let i=0;i<flowNodeList.length;i++){

View File

@ -1,4 +1,4 @@
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="header_title">
<view class="header_title_row">
<van-row>
@ -90,6 +90,71 @@
<van-col span="18">{{procDefName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list color_purple" wx:if="{{infoData.subDeptType}}">
<van-row>
<van-col span="6"><text>分包类型</text></van-col>
<van-col span="18">
<block wx:for="{{subDeptTypes}}" wx:key="index">
<text wx:if="{{item.id==infoData.subDeptType}}">{{item.text}}</text>
</block>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptScope}}">
<van-row>
<van-col span="6"><text class="color_purple">分包范围</text></van-col>
<van-col span="18"><view>
<block wx:for="{{format.split(infoData.subDeptScope,',')}}" wx:key="index">
<block wx:for="{{subDeptScopes}}" wx:for-item="it" wx:key="idx" wx:for-index="itIdx">
<text class="code_label_2 code_label_yellow" wx:if="{{item==it.id}}">{{it.text}}</text>
</block>
</block>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptName}}">
<van-row>
<van-col span="6"><text class="color_purple">分包单位</text></van-col>
<van-col span="18">{{infoData.subDeptName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptAptitude}}">
<van-row>
<van-col span="6"><text class="color_purple">分包资质</text></van-col>
<van-col span="18">{{infoData.subDeptAptitude}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptChairman}}">
<van-row>
<van-col span="6"><text class="color_purple">法人代表</text></van-col>
<van-col span="18">{{infoData.subDeptChairman}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptSafetyCertificate}}">
<van-row>
<van-col span="6"><text class="color_purple">安全证书</text></van-col>
<van-col span="18">{{infoData.subDeptSafetyCertificate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodian}}">
<van-row>
<van-col span="6"><text class="color_purple">项目经理</text></van-col>
<van-col span="18">{{infoData.subDeptCustodian}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodianCardId}}">
<van-row>
<van-col span="6"><text class="color_purple">身份证号</text></van-col>
<van-col span="18">{{infoData.subDeptCustodianCardId}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptApproachDate}}">
<van-row>
<van-col span="6"><text class="color_purple">进场时间</text></van-col>
<van-col span="18">{{infoData.subDeptApproachDate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" style="width: 100%;">
<van-row>
<van-col span="6"><text class="color_purple">审批内容</text></van-col>

View File

@ -1,6 +1,15 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
.problem_list_info_con{
padding-right: 10rpx !important;
padding: 0 !important;
}
.problem_list_info_con .in-img-div{
padding-right: 15rpx !important;
}
.code_label_2{
padding: 8rpx 20rpx 8rpx 20rpx !important;
margin-right: 15rpx;
width: auto !important;
display: inline-block;
}
.in-img-max:after{
display:block;

View File

@ -1,5 +1,8 @@
import config from '../../../config'
import { queryTaskCountByCategory } from '../../../api/flowable'
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
@ -61,6 +64,11 @@ Page({
name: '专项验收审批',
icon: config.baseUrl + '/staticFiles/img/zxyssp.png',
todoDB:0,
}, {
id: 9,
name: '分包资质审批',
icon: config.baseUrl + '/staticFiles/img/tzl.png',
todoDB:0,
}
],
},
@ -75,27 +83,28 @@ Page({
startDeptName,
startUserName,
procDefName,
businessKeyName
businessKeyName,
category
} = e.currentTarget.dataset.set
if (taskName == "提交申请") {
if (procDefKey == "flow_xmglzdl_qjspb") {
wx.redirectTo({
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await&procDefKey=${procDefKey}&category=${category}`,
})
} else {
wx.redirectTo({
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await&procDefKey=${procDefKey}&category=${category}`,
})
}
} else {
//根据不同业务跳转不同表单
if (procDefKey == "flow_xmglzdl_qjspb") {
wx.redirectTo({
url: `../approveLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
url: `../approveLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&procDefKey=${procDefKey}&category=${category}`,
})
} else {
wx.redirectTo({
url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&procDefKey=${procDefKey}&category=${category}`,
})
}
}
@ -105,6 +114,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(!getToken()){
wx.redirectTo({
url: '../../login/index',
})
}
let category;
if(options && options.category){
category = options.category;
@ -141,12 +155,8 @@ Page({
id: app.globalData.projectId
}
})
},
fail: err => {
//未获取用户信息时,重新登录
wx.redirectTo({
url: '../pages/login/index',
})
let myProjects = this.selectComponent("#projectSel");
myProjects.load();
}
})
} else {

View File

@ -4,7 +4,8 @@
"van-popup": "@vant/weapp/popup/index",
"van-divider":"@vant/weapp/divider/index",
"van-sidebar":"@vant/weapp/sidebar/index",
"van-sidebar-item":"@vant/weapp/sidebar-item/index"
"van-sidebar-item":"@vant/weapp/sidebar-item/index",
"van-notice-bar": "@vant/weapp/notice-bar/index"
},
"navigationStyle":"custom"
}

View File

@ -13,7 +13,7 @@
</view>
</view>
<view class="max_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="gd_max" style="margin-top: 20rpx;">
<van-row class="demo clearfix">
<van-col span="8" wx:for="{{typeList}}" wx:key="index">
@ -25,6 +25,7 @@
</van-col>
</van-row>
</view>
<view style="padding-left: 30rpx;padding-right: 30rpx;"><van-notice-bar left-icon="https://szgcwx.jhncidg.com/staticFiles/icon/notice.png" text="发起审批申请时,请切换上方不同的申请类型,然后点击下方发起审批。暂不支持跨类型申请!" /></view>
<van-divider content-position="left" :style="{padding:'90px 60px'}">
{{categoryName}}
</van-divider>

View File

@ -1,4 +1,7 @@
/* pageage/project_checking_list/project_checking_list.wxss */
.van-notice-bar{
background-color: #25345f !important;
}
.gd_max{
padding:10rpx 50rpx 0;
}

View File

@ -1,4 +1,7 @@
import config from '../../../config'
import {
getDictCache
} from '../../../api/publics'
const app = getApp()
Page({
@ -38,7 +41,9 @@ Page({
taskComType:"",
fileType: ["pdf"],
active: 100,
rejectNode:false
rejectNode:false,
subDeptTypes: [],
subDeptScopes: [],
},
/**
@ -57,8 +62,12 @@ Page({
userId,
finishTime,
ret,
taskComType
taskComType,
procDefKey
} = options
if (procDefKey == "flow_fbzzsp_fbszzsp") {
this.getDicts();
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -87,6 +96,40 @@ Page({
})
},
//获取字典信息
getDicts() {
let that = this;
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
getDictCache('flow_sub_dept_type').then(res => {
if (res.code == 200) {
let typeList = [];
res.data.forEach(item => {
typeList.push({
"id": item.dictValue,
"text": item.dictLabel
});
})
that.setData({
subDeptTypes: typeList
})
}
});
getDictCache('flow_sub_dept_scope').then(res => {
if (res.code == 200) {
let scopeList = [];
res.data.forEach(item => {
scopeList.push({
"id": item.dictValue,
"text": item.dictLabel
});
})
that.setData({
subDeptScopes: scopeList
})
}
});
},
getFlowNode(val) {
let flowNodeList = this.data.flowNodeList;
for (let i = 0; i < flowNodeList.length; i++) {

View File

@ -1,4 +1,4 @@
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="header_title">
<view class="header_title_row">
<van-row>
@ -84,6 +84,71 @@
<van-col span="18">{{nickName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list color_purple" wx:if="{{infoData.subDeptType}}">
<van-row>
<van-col span="6"><text>分包类型</text></van-col>
<van-col span="18">
<block wx:for="{{subDeptTypes}}" wx:key="index">
<text wx:if="{{item.id==infoData.subDeptType}}">{{item.text}}</text>
</block>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptScope}}">
<van-row>
<van-col span="6"><text class="color_purple">分包范围</text></van-col>
<van-col span="18"><view>
<block wx:for="{{format.split(infoData.subDeptScope,',')}}" wx:key="index">
<block wx:for="{{subDeptScopes}}" wx:for-item="it" wx:key="idx" wx:for-index="itIdx">
<text class="code_label_2 code_label_yellow" wx:if="{{item==it.id}}">{{it.text}}</text>
</block>
</block>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptName}}">
<van-row>
<van-col span="6"><text class="color_purple">分包单位</text></van-col>
<van-col span="18">{{infoData.subDeptName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptAptitude}}">
<van-row>
<van-col span="6"><text class="color_purple">分包资质</text></van-col>
<van-col span="18">{{infoData.subDeptAptitude}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptChairman}}">
<van-row>
<van-col span="6"><text class="color_purple">法人代表</text></van-col>
<van-col span="18">{{infoData.subDeptChairman}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptSafetyCertificate}}">
<van-row>
<van-col span="6"><text class="color_purple">安全证书</text></van-col>
<van-col span="18">{{infoData.subDeptSafetyCertificate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodian}}">
<van-row>
<van-col span="6"><text class="color_purple">项目经理</text></van-col>
<van-col span="18">{{infoData.subDeptCustodian}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodianCardId}}">
<van-row>
<van-col span="6"><text class="color_purple">身份证号</text></van-col>
<van-col span="18">{{infoData.subDeptCustodianCardId}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.subDeptApproachDate}}">
<van-row>
<van-col span="6"><text class="color_purple">进场时间</text></van-col>
<van-col span="18">{{infoData.subDeptApproachDate}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">审批事项</text></van-col>
@ -94,7 +159,7 @@
<van-row>
<van-col span="6"><text class="color_purple">审批内容</text></van-col>
<van-col span="18">
<view class="problem_list_info_con in-img-max" wx:if="{{imageList.length>0}}">
<view class="inspect_info_content in-img-max" wx:if="{{imageList.length>0}}">
<view class="in-img-div" wx:for="{{imageList}}" wx:key="index">
<image bindtap='showImg' data-set="{{item}}" src='{{item.minPath}}'></image>
</view>

View File

@ -1,6 +1,15 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
.problem_list_info_con{
padding-right: 10rpx !important;
padding: 0 !important;
}
.problem_list_info_con .in-img-div{
padding-right: 15rpx !important;
}
.code_label_2{
padding: 8rpx 20rpx 8rpx 20rpx !important;
margin-right: 15rpx;
width: auto !important;
display: inline-block;
}
.in-img-max:after{
display:block;

View File

@ -74,7 +74,7 @@
</view>
<view class="inspect_info_list" style="width: 100%;">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">请假时间</view>
<view class="problem_list_info_con">
<view class="inspect_info_content">
<van-row>
<van-col span="10">
<voucher-date counts="5" maxDate="{{maxDate}}" placeholder="开始时间" bindchange="onbeginDate" time="{{beginDate}}"></voucher-date>

View File

@ -1,4 +1,7 @@
import config from '../../../config'
import {
getDictCache
} from '../../../api/publics'
const app = getApp()
Page({
@ -32,20 +35,40 @@ Page({
ret: "",
remark: "",
filesData: [],
limit:9,
limit: 30,
fileType: ["pdf"],
imageType: ["png", "jpg", "jpeg"],
imageInfoData: [],
isFiles: null,
active: 100,
rejectNode:false
rejectNode: false,
fbAptitude: false,
subDeptTypes: [],
subDeptScopes: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {deployId,procInsId,procDefName,deptName,nickName,taskId,taskName,projectName,ret} = options
let {
deployId,
procInsId,
procDefName,
deptName,
nickName,
taskId,
taskName,
projectName,
ret,
procDefKey
} = options
if (procDefKey == "flow_fbzzsp_fbszzsp") {
this.getDicts();
this.setData({
fbAptitude: true
})
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -72,6 +95,110 @@ Page({
})
},
//获取字典信息
getDicts() {
let that = this;
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
getDictCache('flow_sub_dept_type').then(res => {
if (res.code == 200) {
let typeList = [];
res.data.forEach(item => {
typeList.push({
"id": item.dictValue,
"text": item.dictLabel
});
})
that.setData({
subDeptTypes: typeList
})
}
});
getDictCache('flow_sub_dept_scope').then(res => {
if (res.code == 200) {
let scopeList = [];
res.data.forEach(item => {
scopeList.push({
"id": item.dictValue,
"text": item.dictLabel,
"type": false
});
})
that.setData({
subDeptScopes: scopeList
})
}
});
},
//选择分包类型
onSelectSubDeptTypes(e) {
this.setData({
"infoData.subDeptType": e.detail.id
})
},
//选择分包范围
onSelectSubDeptScopes(e) {
let list = [];
e.detail.forEach(it =>{
if(it.id){
list.push(it.id)
}
})
this.setData({
"infoData.subDeptScope": list.toString()
})
},
//输入分包单位名称
inputSubDeptName(e) {
this.setData({
"infoData.subDeptName": e.detail.value
})
},
//输入分包单位资质
inputSubDeptAptitude(e) {
this.setData({
"infoData.subDeptAptitude": e.detail.value
})
},
//输入分包单位法人代表
inputSubDeptChairman(e) {
this.setData({
"infoData.subDeptChairman": e.detail.value
})
},
//输入分包单位安全证书
inputSubDeptSafetyCertificate(e) {
this.setData({
"infoData.subDeptSafetyCertificate": e.detail.value
})
},
//输入分包单位项目经理
inputSubDeptCustodian(e) {
this.setData({
"infoData.subDeptCustodian": e.detail.value
})
},
//输入分包单位名称
inputSubDeptCustodianCardId(e) {
this.setData({
"infoData.subDeptCustodianCardId": e.detail.value
})
},
//选择分包进场时间
inputSubDeptApproachDate(e) {
this.setData({
"infoData.subDeptApproachDate": e.detail
})
},
getFlowNode(val) {
let flowNodeList = this.data.flowNodeList;
for (let i = 0; i < flowNodeList.length; i++) {
@ -191,10 +318,25 @@ Page({
res = res.data
if (res.code == 200) {
that.setData({
infoData:res.data
infoData: res.data,
})
let filesData = [];
let imageList = [];
/**
* 分包范围
*/
if(res.data.subDeptScope){
let list = that.data.subDeptScopes;
list.forEach(it =>{
if(res.data.subDeptScope.split(',').indexOf(it.id)>-1){
it.type = true;
}
});
that.setData({
subDeptScopes: list,
})
}
//判断附件
if (res.data.files) {
res.data.files.split(',').forEach(element => {
@ -203,7 +345,10 @@ Page({
imageList.push(config.baseUrl + element);
} else {
let it = element.split('/');
filesData.push({name:it[it.length-1],path:element});
filesData.push({
name: it[it.length - 1],
path: element
});
}
});
}
@ -211,8 +356,7 @@ Page({
filesData,
imageInfoData: imageList,
isFiles: filesData.length > 0 ? true : false,
remark:res.data.remark,
filesData:filesData
remark: res.data.remark
})
} else {
app.toast(res.msg);
@ -236,9 +380,15 @@ Page({
success(res) {
res = res.data
if (res.code == 200) {
let list = [{id:'',text:''}];
let list = [{
id: '',
text: ''
}];
res.data.forEach(item => {
list.push({id:item.id,text:item.name})
list.push({
id: item.id,
text: item.name
})
})
that.setData({
targetKeyList: list
@ -255,7 +405,16 @@ Page({
this.setData({
loadShow: true
})
let {procDefId,projectId,userId,loginName,remark,filesData} = this.data;
let {
procDefId,
projectId,
userId,
loginName,
remark,
filesData,
fbAptitude,
infoData
} = this.data;
//数据效验
if (projectId == "" || loginName == "" || userId == "" || procDefId == "") {
app.toast("数据异常,请刷新页面重试!")
@ -264,13 +423,72 @@ Page({
})
return;
}
if(remark==""){
app.toast("请填写申请说明!")
//分包资质审批数据效验
if (fbAptitude) {
if (infoData.subDeptType == "") {
app.toast("请选择分包类型!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptScope == "") {
app.toast("请选择分包范围!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptName == "") {
app.toast("请填写分包单位名称!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptAptitude == "") {
app.toast("请填写分包单位资质!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptChairman == "") {
app.toast("请填写分包单位法人代表!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptSafetyCertificate == "") {
app.toast("请填写分包单位安全生产许可证!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptCustodian == "") {
app.toast("请填写分包单位项目经理!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptCustodianCardId == "") {
app.toast("请填写分包单位项目经理身份证号!")
this.setData({
loadShow: false
})
return;
}
if (infoData.subDeptApproachDate == "") {
app.toast("请选择分包单位进场时间!")
this.setData({
loadShow: false
})
return;
}
}
if (filesData.length == 0 && this.data.imageInfoData.length == 0) {
app.toast("请上传审批内容!")
this.setData({
@ -278,6 +496,13 @@ Page({
});
return;
}
if (remark == "") {
app.toast("请填写申请说明!")
this.setData({
loadShow: false
})
return;
}
for (let i = 0; i < filesData.length; i++) {
let _fileType = filesData[0].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
@ -310,7 +535,20 @@ Page({
submit() {
let that = this
let {taskId,procInsId,projectId,projectName,userId,loginName,nickName,remark,filesData,imageInfoData} = that.data;
let {
taskId,
procInsId,
projectId,
projectName,
userId,
loginName,
nickName,
remark,
filesData,
imageInfoData,
fbAptitude,
infoData
} = that.data;
let fileUrls = [];
filesData.forEach(f => {
imageInfoData.push(f.path);
@ -329,6 +567,21 @@ Page({
}
//验证图片上传完毕
if (fileUrls.length == imageInfoData.length) {
//分包单位资质审批参数
let fbAptitudeParams = {};
if (fbAptitude) {
fbAptitudeParams = {
subDeptType:infoData.subDeptType,
subDeptScope:infoData.subDeptScope,
subDeptName:infoData.subDeptName,
subDeptAptitude:infoData.subDeptAptitude,
subDeptChairman:infoData.subDeptChairman,
subDeptSafetyCertificate:infoData.subDeptSafetyCertificate,
subDeptCustodian:infoData.subDeptCustodian,
subDeptCustodianCardId:infoData.subDeptCustodianCardId,
subDeptApproachDate:infoData.subDeptApproachDate
}
}
let params = {
taskId,
instanceId: procInsId,
@ -339,7 +592,8 @@ Page({
projectName,
files: fileUrls.toString(),
remark,
INITIATOR:that.data.infoData.INITIATOR
INITIATOR: that.data.infoData.INITIATOR,
...fbAptitudeParams
}
}
wx.request({
@ -391,7 +645,9 @@ Page({
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
name, //上传的所需字段,后端提供
formData: { user: 'test' },
formData: {
user: 'test'
},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
@ -511,7 +767,7 @@ Page({
})
} else {
wx.redirectTo({
url: '../myFlowDefinition/index'
url: '../myProcessIns/index'
})
}
},

View File

@ -3,7 +3,8 @@
"van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item"
"van-collapse-item": "@vant/weapp/collapse-item",
"van-notice-bar": "@vant/weapp/notice-bar/index"
},
"navigationStyle":"custom"
}

View File

@ -90,6 +90,63 @@
{{procDefName}}
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包类型</view>
<view class="inspect_info_content">
<voucher-select columns="{{subDeptTypes}}" selectValue="{{infoData.subDeptType}}" placeholder="请选择分包类型" bindchange="onSelectSubDeptTypes"></voucher-select>
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包范围</view>
<view class="inspect_info_content">
<voucher-many-select columns="{{subDeptScopes}}" placeholder="请选择分包范围" bindchange="onSelectSubDeptScopes"></voucher-many-select>
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包单位</view>
<view class="inspect_info_content">
<input placeholder="请填写分包单位名称" model:value="{{infoData.subDeptName}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptName" maxlength="50" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包资质</view>
<view class="inspect_info_content">
<input placeholder="请填写分包单位资质" model:value="{{infoData.subDeptAptitude}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptAptitude" maxlength="50" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">法人代表</view>
<view class="inspect_info_content">
<input placeholder="请填写分包单位法人代表" model:value="{{infoData.subDeptChairman}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptChairman" maxlength="20" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">安全证书</view>
<view class="inspect_info_content">
<input placeholder="请填写分包单位安全生产许可证" model:value="{{infoData.subDeptSafetyCertificate}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptSafetyCertificate" maxlength="50" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理</view>
<view class="inspect_info_content">
<input placeholder="请填写分包单位项目经理" model:value="{{infoData.subDeptCustodian}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptCustodian" maxlength="20" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view>
<view class="inspect_info_content">
<input placeholder="请填写分包单位项目经理身份证号" model:value="{{infoData.subDeptCustodianCardId}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptCustodianCardId" maxlength="20" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title">进场时间</view>
<view class="inspect_info_content">
<voucher-date counts="5" placeholder="请选择分包单位进场时间" maxDate="{{maxDate}}" bindchange="inputSubDeptApproachDate" time="{{infoData.subDeptApproachDate}}"></voucher-date>
</view>
</view>
<block wx:if="{{fbAptitude}}">
<van-notice-bar left-icon="https://szgcwx.jhncidg.com/staticFiles/icon/notice.png" text="请至少上传报审表,营业执照,安全生产许可证,资质证书,人员证书等!缺少相关附件可能被驳回申请。" />
</block>
<view class="inspect_info_list" style="width: 100%;" wx:if="{{!isFiles || imageInfoData.length>0}}">
<view class="inspect_info_title module_title_flex" style="padding: 20rpx 0 10rpx;">审批内容 [仅可上传图片]
<view class="module_see_info_switct" bindtap="switchFiles" wx:if="{{filesData.length==0}}">

View File

@ -2,6 +2,9 @@
.van-popup{
background: none !important;
}
.van-notice-bar{
background-color: #25345f !important;
}
.van-image__img{
border-radius: 10rpx !important;
}

View File

@ -1,3 +1,6 @@
import {
getDictCache
} from '../../../api/publics'
const app = getApp()
Page({
@ -6,6 +9,7 @@ Page({
*/
data: {
maxDate: new Date(2088, 1, 1).getTime(),
minDate: new Date(2001, 1, 1).getTime(),
deptId: "",
deptName: "",
userId: "",
@ -15,7 +19,7 @@ Page({
projectName: "",
remark: "",
filesData: [],
limit: 9,
limit: 30,
fileType: ["pdf", "png", "jpg", "jpeg"],
procDefId: "",
approveTitle: "",
@ -26,6 +30,18 @@ Page({
isFiles: false,
imageInfoData: [],
active: 0,
fbAptitude: false,
subDeptType: "",
subDeptTypes: [],
subDeptScope: "",
subDeptScopes: [],
subDeptName: "",
subDeptAptitude: "",
subDeptChairman: "",
subDeptSafetyCertificate: "",
subDeptCustodian: "",
subDeptCustodianCardId: "",
subDeptApproachDate: "",
},
/**
@ -35,8 +51,15 @@ Page({
let {
procDefId,
approveTitle,
deploymentId
deploymentId,
procDefKey
} = options
if (procDefKey == "flow_fbzzsp_fbszzsp") {
this.getDicts();
this.setData({
fbAptitude: true
})
}
//获取缓存数据
wx.getStorage({
key: 'userinfo',
@ -66,6 +89,115 @@ Page({
})
},
//获取字典信息
getDicts() {
let that = this;
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
getDictCache('flow_sub_dept_type').then(res => {
if (res.code == 200) {
let typeList = [];
res.data.forEach(item => {
typeList.push({
"id": item.dictValue,
"text": item.dictLabel
});
})
that.setData({
subDeptTypes: typeList,
subDeptType: typeList[0].id,
})
}
});
getDictCache('flow_sub_dept_scope').then(res => {
if (res.code == 200) {
let scopeList = [];
res.data.forEach(item => {
scopeList.push({
"id": item.dictValue,
"text": item.dictLabel
});
})
that.setData({
subDeptScopes: scopeList,
subDeptScope: scopeList[0].id,
})
}
});
},
//选择分包类型
onSelectSubDeptTypes(e) {
this.setData({
subDeptType: e.detail.id
})
},
//选择分包范围
onSelectSubDeptScopes(e) {
let list = [];
e.detail.forEach(it =>{
if(it.id){
list.push(it.id)
}
})
this.setData({
subDeptScope: list.toString()
})
},
//输入分包单位名称
inputSubDeptName(e) {
this.setData({
subDeptName: e.detail.value
})
},
//输入分包单位资质
inputSubDeptAptitude(e) {
this.setData({
subDeptAptitude: e.detail.value
})
},
//输入分包单位法人代表
inputSubDeptChairman(e) {
this.setData({
subDeptChairman: e.detail.value
})
},
//输入分包单位安全证书
inputSubDeptSafetyCertificate(e) {
this.setData({
subDeptSafetyCertificate: e.detail.value
})
},
//输入分包单位项目经理
inputSubDeptCustodian(e) {
this.setData({
subDeptCustodian: e.detail.value
})
},
//输入分包单位名称
inputSubDeptCustodianCardId(e) {
this.setData({
subDeptCustodianCardId: e.detail.value
})
},
//选择分包进场时间
inputSubDeptApproachDate(e) {
this.setData({
subDeptApproachDate: e.detail
})
},
/**
* 获取流程节点
* @param {*} val
*/
getFlowNode(val) {
let flowNodeList = this.data.flowNodeList;
for (let i = 0; i < flowNodeList.length; i++) {
@ -132,7 +264,17 @@ Page({
userId,
loginName,
remark,
filesData
filesData,
fbAptitude,
subDeptType,
subDeptScope,
subDeptName,
subDeptAptitude,
subDeptChairman,
subDeptSafetyCertificate,
subDeptCustodian,
subDeptCustodianCardId,
subDeptApproachDate
} = this.data;
//数据效验
if (projectId == "" || loginName == "" || userId == "" || procDefId == "") {
@ -142,13 +284,72 @@ Page({
})
return;
}
if (remark == "") {
app.toast("请填写申请说明!")
//分包资质审批数据效验
if (fbAptitude) {
if (subDeptType == "") {
app.toast("请选择分包类型!")
this.setData({
loadShow: false
})
return;
}
if (subDeptScope == "") {
app.toast("请选择分包范围!")
this.setData({
loadShow: false
})
return;
}
if (subDeptName == "") {
app.toast("请填写分包单位名称!")
this.setData({
loadShow: false
})
return;
}
if (subDeptAptitude == "") {
app.toast("请填写分包单位资质!")
this.setData({
loadShow: false
})
return;
}
if (subDeptChairman == "") {
app.toast("请填写分包单位法人代表!")
this.setData({
loadShow: false
})
return;
}
if (subDeptSafetyCertificate == "") {
app.toast("请填写分包单位安全生产许可证!")
this.setData({
loadShow: false
})
return;
}
if (subDeptCustodian == "") {
app.toast("请填写分包单位项目经理!")
this.setData({
loadShow: false
})
return;
}
if (subDeptCustodianCardId == "") {
app.toast("请填写分包单位项目经理身份证号!")
this.setData({
loadShow: false
})
return;
}
if (subDeptApproachDate == "") {
app.toast("请选择分包单位进场时间!")
this.setData({
loadShow: false
})
return;
}
}
if (filesData.length == 0 && this.data.imageInfoData.length == 0) {
app.toast("请上传审批内容!")
this.setData({
@ -156,6 +357,13 @@ Page({
});
return;
}
if (remark == "") {
app.toast("请填写申请说明!")
this.setData({
loadShow: false
})
return;
}
for (let i = 0; i < filesData.length; i++) {
let _fileType = filesData[0].path.split('.');
_fileType = _fileType[_fileType.length - 1].toLowerCase();
@ -198,7 +406,17 @@ Page({
nickName,
remark,
filesData,
imageInfoData
imageInfoData,
fbAptitude,
subDeptType,
subDeptScope,
subDeptName,
subDeptAptitude,
subDeptChairman,
subDeptSafetyCertificate,
subDeptCustodian,
subDeptCustodianCardId,
subDeptApproachDate
} = that.data;
let fileUrls = [];
filesData.forEach(f => {
@ -212,6 +430,21 @@ Page({
fileUrls.push(obj.data.fileName);
//验证图片上传完毕
if (fileUrls.length == imageInfoData.length) {
//分包单位资质审批参数
let fbAptitudeParams = {};
if(fbAptitude){
fbAptitudeParams = {
subDeptType,
subDeptScope,
subDeptName,
subDeptAptitude,
subDeptChairman,
subDeptSafetyCertificate,
subDeptCustodian,
subDeptCustodianCardId,
subDeptApproachDate
}
}
let params = {
procDefId,
userId,
@ -222,6 +455,7 @@ Page({
projectName,
files: fileUrls.toString(),
remark,
...fbAptitudeParams
}
}
wx.request({

View File

@ -3,7 +3,8 @@
"van-overlay": "@vant/weapp/overlay/index",
"van-collapse": "@vant/weapp/collapse",
"van-steps": "@vant/weapp/steps/index",
"van-collapse-item": "@vant/weapp/collapse-item"
"van-collapse-item": "@vant/weapp/collapse-item",
"van-notice-bar": "@vant/weapp/notice-bar/index"
},
"navigationStyle":"custom"
}

View File

@ -46,6 +46,63 @@
{{approveTitle}}
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包类型</view>
<view class="inspect_info_content">
<voucher-select columns="{{subDeptTypes}}" placeholder="请选择分包类型" bindchange="onSelectSubDeptTypes"></voucher-select>
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包范围</view>
<view class="inspect_info_content">
<voucher-many-select columns="{{subDeptScopes}}" placeholder="请选择分包范围" bindchange="onSelectSubDeptScopes"></voucher-many-select>
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<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" bindinput="inputSubDeptName" maxlength="50" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<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" bindinput="inputSubDeptAptitude" maxlength="50" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<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" bindinput="inputSubDeptChairman" maxlength="20" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<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" bindinput="inputSubDeptSafetyCertificate" maxlength="50" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<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" bindinput="inputSubDeptCustodian" maxlength="20" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<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" bindinput="inputSubDeptCustodianCardId" maxlength="20" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
<view class="inspect_info_title">进场时间</view>
<view class="inspect_info_content">
<voucher-date counts="5" placeholder="请选择分包单位进场时间" minDate="{{minDate}}" maxDate="{{maxDate}}" bindchange="inputSubDeptApproachDate"></voucher-date>
</view>
</view>
<block wx:if="{{fbAptitude}}">
<van-notice-bar left-icon="https://szgcwx.jhncidg.com/staticFiles/icon/notice.png" text="请至少上传报审表,营业执照,安全生产许可证,资质证书,人员证书等!缺少相关附件可能被驳回申请。" />
</block>
<view class="inspect_info_list" style="width: 100%;" wx:if="{{!isFiles}}">
<view class="inspect_info_title module_title_flex" style="padding: 20rpx 0 10rpx;">审批内容 [仅可上传图片]
<view class="module_see_info_switct" bindtap="switchFiles">

View File

@ -2,6 +2,9 @@
.van-popup{
background: none !important;
}
.van-notice-bar{
background-color: #25345f !important;
}
.van-image__img{
border-radius: 10rpx !important;
}

View File

@ -19,14 +19,14 @@ Page({
},
addInfo(e){
let {id,name,deploymentId,flowKey} = e.currentTarget.dataset.set
let {id,name,deploymentId,flowKey,category} = e.currentTarget.dataset.set
if(flowKey=="flow_xmglzdl_qjspb"){
wx.redirectTo({
url: `../initLeaveTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}`,
url: `../initLeaveTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}&procDefKey=${flowKey}&category=${category}`,
})
}else{
wx.redirectTo({
url: `../initTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}`,
url: `../initTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}&procDefKey=${flowKey}&category=${category}`,
})
}
},

View File

@ -19,7 +19,7 @@
<view class="inspect_list_title">
<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.categoryName}}<text class="timeline_for_state_1">{{' v '+item.version}}</text></view>
<view class="module_title module_title_flex inspect_list_title_text">{{item.categoryName}}<text class="timeline_for_state_1">{{' 流程版本v '+item.version}}</text></view>
</view>
</view>
<view class="inspect_list_info">

View File

@ -49,29 +49,29 @@ Page({
},
getInfo(e){
let {deployId,procInsId,taskId,taskName,procDefKey,startDeptName,startUserName,procDefName,businessKeyName,finishTime,taskComType} = e.currentTarget.dataset.set
let {deployId,procInsId,taskId,taskName,procDefKey,startDeptName,startUserName,procDefName,businessKeyName,finishTime,taskComType,category} = e.currentTarget.dataset.set
if(!finishTime){
finishTime="";
}
if(taskName=="提交申请"){
if(procDefKey=="flow_xmglzdl_qjspb"){
wx.redirectTo({
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess`,
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess&procDefKey=${procDefKey}&category=${category}`,
})
}else{
wx.redirectTo({
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess`,
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess&procDefKey=${procDefKey}&category=${category}`,
})
}
}else{
//根据不同业务跳转不同表单
if(procDefKey=="flow_xmglzdl_qjspb"){
wx.redirectTo({
url: `../detailLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}`,
url: `../detailLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}&procDefKey=${procDefKey}&category=${category}`,
})
}else{
wx.redirectTo({
url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}`,
url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}&procDefKey=${procDefKey}&category=${category}`,
})
}
}

View File

@ -35,7 +35,8 @@
</view>
<view class="inspect_list_info">
<view class="inspect_list_info_data_prop color_orange">项目名称:{{item.businessKeyName}}</view>
<view class="inspect_list_info_data_prop color_blue">审批事项:{{item.procDefName}} {{' v'+item.procDefVersion}}</view>
<view class="inspect_list_info_data_prop color_blue">审批事项:{{item.procDefName}}
<text class="code_label_2 code_label_green">{{' 流程版本v'+item.procDefVersion}}</text></view>
<view class="inspect_list_info_data_prop">流程类别:<text wx:if="{{item.category=='1'}}">程序及质量类</text><text wx:if="{{item.category=='2'}}">安全类</text><text wx:if="{{item.category=='3'}}">认价类</text><text wx:if="{{item.category=='4'}}">图纸类</text><text wx:if="{{item.category=='5'}}">项目管理制度类</text><text wx:if="{{item.category=='6'}}">索赔类</text><text wx:if="{{item.category=='7'}}">特殊事项确认类</text><text wx:if="{{item.category=='8'}}">专项验收审批</text></view>
<view class="inspect_list_info_data_prop">当前节点:<text wx:if="{{item.finishTime == null}}">{{item.taskName}}</text>
<text wx:if="{{item.finishTime != null}}">流程结束</text>

View File

@ -15,9 +15,8 @@ Page({
wx.getStorage({
key: 'userinfo',
success: res => {
//config.manageUrl +
this.setData({
url:"https://szgcwx.jhncidg.com/wechat/wxAuth/authorize?userOpenId=" + res.data.openId
url:config.baseUrl+"/wechat/wxAuth/authorize?userOpenId=" + res.data.openId
})
}
})

View File

@ -1,3 +1,4 @@
{
"usingComponents": {}
"usingComponents": {},
"navigationStyle":"custom"
}

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