提交代码
parent
ec75179b6d
commit
c3cf671949
|
|
@ -1,4 +1,6 @@
|
||||||
import {request} from '../utils/request'
|
import {
|
||||||
|
request
|
||||||
|
} from '../utils/request'
|
||||||
|
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
export function getCodeImg() {
|
export function getCodeImg() {
|
||||||
|
|
@ -8,19 +10,28 @@ export function getCodeImg() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 登录方法
|
// 用户登录
|
||||||
export function login(data) {
|
export function login(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wxApi/login',
|
url: '/wechat/login',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 登录方法
|
// 修改密码
|
||||||
export function updatePwd(data) {
|
export function updatePwd(data) {
|
||||||
return request({
|
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',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
})
|
})
|
||||||
|
|
@ -34,10 +45,21 @@ export function loginOut() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 发送短信验证码
|
||||||
|
export function sendPhoneMessage(phoneNumber) {
|
||||||
|
return request({
|
||||||
|
url: '/wechat/v1/sendPhoneMessage',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
'phoneNumber': phoneNumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询公众号消息授权
|
// 查询公众号消息授权
|
||||||
export function findOpenUserMsgId(openId) {
|
export function findOpenUserMsgId(openId) {
|
||||||
return request({
|
return request({
|
||||||
'url': '/wechat/findOpenUserMsgId/'+openId,
|
'url': '/wechat/findOpenUserMsgId/' + openId,
|
||||||
'method': 'get'
|
'method': 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -45,7 +67,7 @@ export function findOpenUserMsgId(openId) {
|
||||||
// 删除公众号消息授权
|
// 删除公众号消息授权
|
||||||
export function delOpenUserMsgId(openId) {
|
export function delOpenUserMsgId(openId) {
|
||||||
return request({
|
return request({
|
||||||
'url': '/wechat/delOpenUserMsgId/'+openId,
|
'url': '/wechat/delOpenUserMsgId/' + openId,
|
||||||
'method': 'get'
|
'method': 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -57,3 +57,11 @@ export function findProjectApplyData(id){
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取系统字典信息
|
||||||
|
export function getDictCache(type){
|
||||||
|
return request({
|
||||||
|
url: '/wechat/publics/v1/getDictCache/'+type,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
//app.js
|
import {
|
||||||
|
getToken
|
||||||
|
} from '/utils/auth'
|
||||||
|
|
||||||
//全局分享
|
//全局分享
|
||||||
!function(){
|
!function(){
|
||||||
|
|
@ -78,11 +80,18 @@ App({
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.autoUpdate();
|
this.autoUpdate();
|
||||||
|
if(!getToken()){
|
||||||
|
setTimeout(() => {
|
||||||
|
this.toast("请使用手机号码登录",1500);
|
||||||
|
}, 1000);
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/login/index',
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(){
|
onLoad(){},
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
//页面弹窗
|
//页面弹窗
|
||||||
toast: function (msg) {
|
toast: function (msg) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
"pages/login/index",
|
"pages/login/index",
|
||||||
|
"pages/alter-ps/index",
|
||||||
"pages/wx-auth/index",
|
"pages/wx-auth/index",
|
||||||
"pages/gongchengliebiao/index",
|
"pages/gongchengliebiao/index",
|
||||||
"pages/gengduogongneng/index",
|
"pages/gengduogongneng/index",
|
||||||
|
|
|
||||||
|
|
@ -1868,3 +1868,7 @@ swiper-item video {
|
||||||
.van-steps--horizontal{
|
.van-steps--horizontal{
|
||||||
padding: 10px 20px !important;
|
padding: 10px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.files_parent{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,5 @@ module.exports = {
|
||||||
appId: "wx9997d071b4996f23",
|
appId: "wx9997d071b4996f23",
|
||||||
//baseUrl: 'http://127.0.0.1:8091',
|
//baseUrl: 'http://127.0.0.1:8091',
|
||||||
baseUrl: 'https://szgcwx.jhncidg.com',
|
baseUrl: 'https://szgcwx.jhncidg.com',
|
||||||
manageUrl: 'https://szgc.jhncidg.com',
|
noSecuritys:['/wechat/captchaImage','/wechat/login','/wechat/v1/sendPhoneMessage','/wechat/v1/codeUpdatePwd']
|
||||||
noSecuritys:['/wechat/captchaImage','/wxApi/login']
|
|
||||||
};
|
};
|
||||||
|
|
@ -151,14 +151,14 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info">
|
<view class="inspect_info">
|
||||||
<view class="inspect_info_list" >
|
<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">
|
<view class="inspect_info_content">
|
||||||
<textarea class="add_textarea" placeholder="请填写处理意见(600字内)"
|
<textarea class="add_textarea" placeholder="请填写处理意见(600字内)"
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputFlowComment" maxlength="600"/>
|
placeholder-style="color:#6777aa;" bindinput="onInputFlowComment" maxlength="600"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<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">
|
<view class="problem_list_info_con">
|
||||||
<file-uploader bindimages="onImagesArr" limit="{{9}}"></file-uploader>
|
<file-uploader bindimages="onImagesArr" limit="{{9}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
import {list,findGroupCountByApprove} from "../../../api/flowLabour"
|
import {list,findGroupCountByApprove} from "../../../api/flowLabour"
|
||||||
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -38,19 +41,19 @@ Page({
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../check/index?id=${id}`,
|
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({
|
wx.redirectTo({
|
||||||
url: `../check/index?id=${id}`,
|
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({
|
wx.redirectTo({
|
||||||
url: `../info/index?id=${id}`,
|
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({
|
wx.redirectTo({
|
||||||
url: `../check/index?id=${id}`,
|
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({
|
wx.redirectTo({
|
||||||
url: `../info/index?id=${id}`,
|
url: `../info/index?id=${id}`,
|
||||||
})
|
})
|
||||||
|
|
@ -66,6 +69,11 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../pages/login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
if (options && options.barProId) {
|
if (options && options.barProId) {
|
||||||
//数据未加载完毕,从文件读取数据
|
//数据未加载完毕,从文件读取数据
|
||||||
if (app.globalData.projectInfoList.length == 0) {
|
if (app.globalData.projectInfoList.length == 0) {
|
||||||
|
|
@ -95,12 +103,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
fail: err => {
|
myProjects.load();
|
||||||
//未获取用户信息时,重新登录
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../pages/login/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -175,13 +179,17 @@ Page({
|
||||||
//判断角色,
|
//判断角色,
|
||||||
let mr = this.data.minRoleId;
|
let mr = this.data.minRoleId;
|
||||||
let deptId = this.data.deptId;
|
let deptId = this.data.deptId;
|
||||||
|
let projDept = this.data.deptId;
|
||||||
if (mr == 2 || mr == 3 || mr == 4) {
|
if (mr == 2 || mr == 3 || mr == 4) {
|
||||||
deptId = 0;
|
deptId = 0;
|
||||||
}
|
}
|
||||||
|
if(mr == 4){
|
||||||
|
projDept = app.globalData.projectInfoList[0].deptId
|
||||||
|
}
|
||||||
let param = {
|
let param = {
|
||||||
"projectId": this.data.projectId,
|
"projectId": this.data.projectId,
|
||||||
"deptId": deptId,
|
"deptId": deptId,
|
||||||
"nowDept": deptId,
|
"nowDept": projDept,
|
||||||
"nowRole": mr,
|
"nowRole": mr,
|
||||||
"nowUser": this.data.loginName,
|
"nowUser": this.data.loginName,
|
||||||
"activeName": that.data.activeState
|
"activeName": that.data.activeState
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<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="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
<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 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_label inspect_list_title_width">
|
||||||
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
|
<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 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=='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=='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=='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=='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=='30'}}" class="code_label_4 code_label_blueviolet">待集团公司审</view>
|
||||||
<view wx:if="{{item.approveStatus=='100'}}" class="code_label_4 code_label_green">审批完成</view>
|
<view wx:if="{{item.approveStatus=='100'}}" class="code_label_4 code_label_green">审批完成</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/addSafetyInspect/index.js
|
import {
|
||||||
|
syncFileUpload
|
||||||
|
} from '../../../utils/request'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -6,43 +8,64 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
maxDate:new Date(2088,1,1).getTime(),
|
maxDate: new Date(2088, 1, 1).getTime(),
|
||||||
currentDate:new Date().getTime(),
|
deptId: "",
|
||||||
deptId:"",
|
projectId: "",
|
||||||
projectId:"",
|
projectName: "",
|
||||||
projectName:"",
|
loginName: "",
|
||||||
loginName:"",
|
rectifierData: [],
|
||||||
rectifierData:[],
|
loadShow: false,
|
||||||
loadShow:false,
|
checkTypeList: [],
|
||||||
checkTypeList:[],
|
checkType: "1",
|
||||||
checkType:"1",
|
materialName: "",
|
||||||
materialName:"",
|
usePosition: "",
|
||||||
usePosition:"",
|
sampleNum: "",
|
||||||
sampleNum:"",
|
qualifiedFlag: "Y",
|
||||||
qualifiedFlag:"Y",
|
witnessUser: "",
|
||||||
witnessUser:"",
|
witnessUserName: "",
|
||||||
witnessUserName:"",
|
checkTime: "",
|
||||||
checkTime:"",
|
laboratoryName: "",
|
||||||
laboratoryName:"",
|
qualifiedFlagList: [{
|
||||||
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
|
id: 'Y',
|
||||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
text: "是"
|
||||||
active: 0
|
}, {
|
||||||
|
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) {
|
onLoad(options) {
|
||||||
let {projectId,projectName} = options
|
let {
|
||||||
|
projectId,
|
||||||
|
projectName
|
||||||
|
} = options
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
projectId,
|
projectId,
|
||||||
projectName,
|
projectName,
|
||||||
deptId:res.data.deptId,
|
deptId: res.data.deptId,
|
||||||
loginName:res.data.loginName,
|
loginName: res.data.loginName,
|
||||||
})
|
})
|
||||||
this.getProjectUserData();
|
this.getProjectUserData();
|
||||||
this.getTypeList();
|
this.getTypeList();
|
||||||
|
|
@ -51,47 +74,50 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询项目人员数据
|
//查询项目人员数据
|
||||||
getProjectUserData(){
|
getProjectUserData() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
unitType:"4",
|
unitType: "4",
|
||||||
projectId:that.data.projectId
|
projectId: that.data.projectId
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
that.setData({
|
that.setData({
|
||||||
rectifierData:res.data
|
rectifierData: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getTypeList(){
|
getTypeList() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectDetection/queryType',
|
url: app.globalData.reqUrl + '/wechat/projectDetection/queryType',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{},
|
data: {},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let list=[];
|
let list = [];
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it => {
|
||||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
list.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
checkTypeList:list
|
checkTypeList: list
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +125,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//材料名称
|
//材料名称
|
||||||
onInputMaterialNameValue(e){
|
onInputMaterialNameValue(e) {
|
||||||
let materialName = e.detail.value
|
let materialName = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
materialName
|
materialName
|
||||||
|
|
@ -107,21 +133,21 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//使用部位
|
//使用部位
|
||||||
onInputUsePositionValue(e){
|
onInputUsePositionValue(e) {
|
||||||
let usePosition = e.detail.value
|
let usePosition = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
usePosition
|
usePosition
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//取样数量
|
//取样数量
|
||||||
onInputSampleNumValue(e){
|
onInputSampleNumValue(e) {
|
||||||
let sampleNum = e.detail.value
|
let sampleNum = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
sampleNum
|
sampleNum
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//送检实验室名称
|
//送检实验室名称
|
||||||
onInputLaboratoryNameValue(e){
|
onInputLaboratoryNameValue(e) {
|
||||||
let laboratoryName = e.detail.value
|
let laboratoryName = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
laboratoryName
|
laboratoryName
|
||||||
|
|
@ -129,7 +155,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//验收时间
|
//验收时间
|
||||||
onInputTime(e){
|
onInputTime(e) {
|
||||||
let checkTime = e.detail
|
let checkTime = e.detail
|
||||||
this.setData({
|
this.setData({
|
||||||
checkTime
|
checkTime
|
||||||
|
|
@ -137,38 +163,41 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//添加监理专员
|
//添加监理专员
|
||||||
onAddSend(e){
|
onAddSend(e) {
|
||||||
if(e.detail.length>0){
|
if (e.detail.length > 0) {
|
||||||
let phoneNumbers="";
|
let phoneNumbers = "";
|
||||||
let userNames="";
|
let userNames = "";
|
||||||
e.detail.forEach(it =>{
|
e.detail.forEach(it => {
|
||||||
phoneNumbers+=","+it.phoneNumber;
|
phoneNumbers += "," + it.phoneNumber;
|
||||||
userNames+=","+it.userName;
|
userNames += "," + it.userName;
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
witnessUserName:userNames.substring(1),
|
witnessUserName: userNames.substring(1),
|
||||||
witnessUser:phoneNumbers.substring(1)
|
witnessUser: phoneNumbers.substring(1)
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
this.setData({
|
this.setData({
|
||||||
witnessUser:"",
|
witnessUser: "",
|
||||||
witnessUserName:""
|
witnessUserName: ""
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
//取消页面
|
||||||
cancelSaveView(){
|
cancelSaveView() {
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
//保存
|
||||||
onSubmitSave(){
|
onSubmitSave() {
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:true
|
loadShow: true
|
||||||
})
|
})
|
||||||
let that = this
|
let that = this
|
||||||
let {projectId,deptId,checkType,
|
let {
|
||||||
|
projectId,
|
||||||
|
deptId,
|
||||||
|
checkType,
|
||||||
materialName,
|
materialName,
|
||||||
usePosition,
|
usePosition,
|
||||||
sampleNum,
|
sampleNum,
|
||||||
|
|
@ -176,78 +205,107 @@ Page({
|
||||||
witnessUser,
|
witnessUser,
|
||||||
witnessUserName,
|
witnessUserName,
|
||||||
checkTime,
|
checkTime,
|
||||||
laboratoryName,loginName} = that.data;
|
laboratoryName,
|
||||||
|
loginName,
|
||||||
|
trustDeed,
|
||||||
|
attachment
|
||||||
|
} = that.data;
|
||||||
//数据效验
|
//数据效验
|
||||||
if(projectId==""||loginName==""||deptId==""){
|
if (projectId == "" || loginName == "" || deptId == "") {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkType==""){
|
if (checkType == "") {
|
||||||
app.toast("请选择送检类型!")
|
app.toast("请选择送检类型!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(materialName==""){
|
if (materialName == "") {
|
||||||
app.toast("请填写材料名称!")
|
app.toast("请填写材料名称!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(sampleNum==""){
|
if (sampleNum == "") {
|
||||||
app.toast("请填写取样数量!")
|
app.toast("请填写取样数量!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(usePosition==""){
|
if (usePosition == "") {
|
||||||
app.toast("请填写使用部位!")
|
app.toast("请填写使用部位!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(qualifiedFlag==""){
|
if (qualifiedFlag == "") {
|
||||||
app.toast("请选择是否提供合格证!")
|
app.toast("请选择是否提供合格证!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(qualifiedFlag==""){
|
if (qualifiedFlag == "") {
|
||||||
app.toast("请选择是否提供合格证!")
|
app.toast("请选择是否提供合格证!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(witnessUser==""||witnessUserName==""){
|
if (witnessUser == "" || witnessUserName == "") {
|
||||||
app.toast("请选择见证人!")
|
app.toast("请选择见证人!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkTime==""){
|
if (checkTime == "") {
|
||||||
app.toast("请选择送检时间!")
|
app.toast("请选择送检时间!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(laboratoryName==""){
|
if (laboratoryName == "") {
|
||||||
app.toast("请填写送检实验室名称!")
|
app.toast("请填写送检实验室名称!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
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 = {
|
let params = {
|
||||||
projectId,
|
projectId,
|
||||||
deptId,
|
deptId,
|
||||||
|
|
@ -258,48 +316,91 @@ Page({
|
||||||
qualifiedFlag,
|
qualifiedFlag,
|
||||||
witnessUser,
|
witnessUser,
|
||||||
witnessUserName,
|
witnessUserName,
|
||||||
checkTime:checkTime+":00",
|
checkTime: checkTime,
|
||||||
laboratoryName,
|
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({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/projectDetection/add',
|
url: app.globalData.reqUrl + '/wechat/projectDetection/add',
|
||||||
method:"POST",
|
method: "POST",
|
||||||
data:params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"Username": loginName,
|
"Username": that.data.loginName,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
app.toast("添加成功!")
|
app.toast("添加成功!")
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: '../list/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//选择检测类型
|
//选择检测类型
|
||||||
onSelectCheckType(e){
|
onSelectCheckType(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
checkType:e.detail.id
|
checkType: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//选择是否提供合格证
|
//选择是否提供合格证
|
||||||
onSelectQualifiedFlag(e){
|
onSelectQualifiedFlag(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
qualified:e.detail.id
|
qualified: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// list 上传图片
|
||||||
|
onImagesArr(e) {
|
||||||
|
this.setData({
|
||||||
|
trustDeed: e.detail
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关附件上传
|
||||||
|
* @param {*} options
|
||||||
|
*/
|
||||||
|
otherFileUpload(options) {
|
||||||
|
let file = options.detail;
|
||||||
|
this.setData({
|
||||||
|
attachment: file
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
returnToPage: function () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="4">
|
<van-col span="4">
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage">
|
||||||
|
<image src="/images/left.png"></image>
|
||||||
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="15">
|
<van-col span="15">
|
||||||
<view class="header_name">新增取样复试</view>
|
<view class="header_name">新增取样复试</view>
|
||||||
|
|
@ -20,32 +22,31 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">送检类型</view>
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">送检类型</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{checkTypeList}}" placeholder="请选择送检类型" bindchange="onSelectCheckType" ></voucher-select>
|
<voucher-select columns="{{checkTypeList}}" placeholder="请选择送检类型" bindchange="onSelectCheckType"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">材料名称</view>
|
<view class="inspect_info_title">材料名称</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">取样数量</view>
|
<view class="inspect_info_title">取样数量</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">使用部位</view>
|
<view class="inspect_info_title">使用部位</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<textarea class="add_textarea" placeholder="请填写使用部位"
|
<textarea class="add_textarea" placeholder="请填写使用部位" placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200" />
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200"/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">是否提供合格证</view>
|
<view class="inspect_info_title">是否提供合格证</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" bindchange="onSelectQualifiedFlag" ></voucher-select>
|
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" bindchange="onSelectQualifiedFlag"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
|
|
@ -58,20 +59,32 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">送检时间</view>
|
<view class="inspect_info_title">送检时间</view>
|
||||||
<view class="inspect_info_content">
|
<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>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">送检实验室名称</view>
|
<view class="inspect_info_title">送检实验室名称</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="inspect_info_list">
|
||||||
<view class="problem_submit_to">
|
<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>
|
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交送检</view>
|
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交送检</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-overlay show="{{loadShow}}">
|
<van-overlay show="{{loadShow}}">
|
||||||
|
|
@ -80,51 +93,3 @@
|
||||||
<view>数据加载中!请稍后...</view>
|
<view>数据加载中!请稍后...</view>
|
||||||
</view>
|
</view>
|
||||||
</van-overlay>
|
</van-overlay>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,35 +6,54 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
id:"",
|
id: "",
|
||||||
infoData:{},
|
infoData: {},
|
||||||
loadShow:false,
|
loadShow: false,
|
||||||
loginName:"",
|
loginName: "",
|
||||||
showDel:false,
|
showDel: false,
|
||||||
detectionImageList:[],
|
detectionImageList: [],
|
||||||
minDetectionFileImages:[],
|
minDetectionFileImages: [],
|
||||||
detectionFiles:[],
|
detectionFiles: [],
|
||||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
list: [{
|
||||||
detectionResult:"1",
|
id: 1,
|
||||||
detectionFileData:[],
|
text: "合格"
|
||||||
fileType:["pdf","png","jpg","jpeg"],
|
}, {
|
||||||
request:app.globalData.reqUrl,
|
id: 2,
|
||||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
text: "不合格"
|
||||||
active: 2
|
}],
|
||||||
|
detectionResult: "1",
|
||||||
|
detectionFileData: [],
|
||||||
|
fileType: ["pdf", "png", "jpg", "jpeg"],
|
||||||
|
request: app.globalData.reqUrl,
|
||||||
|
flowNodes: [{
|
||||||
|
text: '开始'
|
||||||
|
}, {
|
||||||
|
text: '提交申请'
|
||||||
|
}, {
|
||||||
|
text: '检测报告'
|
||||||
|
}, {
|
||||||
|
text: '监理审批'
|
||||||
|
}, {
|
||||||
|
text: '结束'
|
||||||
|
}],
|
||||||
|
active: 2,
|
||||||
|
attachments: []
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let {id} = options
|
let {
|
||||||
|
id
|
||||||
|
} = options
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
id,
|
id,
|
||||||
loginName:res.data.loginName
|
loginName: res.data.loginName
|
||||||
})
|
})
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
}
|
}
|
||||||
|
|
@ -42,7 +61,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
//取消页面
|
||||||
cancelSaveView(){
|
cancelSaveView() {
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -50,46 +69,62 @@ Page({
|
||||||
* 获取安全检查详情信息
|
* 获取安全检查详情信息
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getInfo(){
|
getInfo() {
|
||||||
let {id} = this.data
|
let {
|
||||||
|
id
|
||||||
|
} = this.data
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectDetection/info',
|
url: app.globalData.reqUrl + '/wechat/projectDetection/info',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
id:id
|
id: id
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let imageUrls = [];
|
let imageUrls = [];
|
||||||
let minImageUrls = [];
|
let minImageUrls = [];
|
||||||
let fileUrls = [];
|
let fileUrls = [];
|
||||||
//判断附件
|
//判断附件
|
||||||
if(res.data.detectionFile){
|
if (res.data.detectionFile) {
|
||||||
res.data.detectionFile.split(',').forEach(element => {
|
res.data.detectionFile.split(',').forEach(element => {
|
||||||
let _file = element.split('.');
|
let _file = element.split('.');
|
||||||
_file = _file[_file.length-1].toLocaleUpperCase();
|
_file = _file[_file.length - 1].toLocaleUpperCase();
|
||||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||||
if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){
|
if (_file == "PNG" || _file == "JPG" || _file == "JPEG") {
|
||||||
imageUrls.push(that.data.request+element);
|
imageUrls.push(that.data.request + element);
|
||||||
minImageUrls.push(that.data.request+element+'.min.jpg');
|
minImageUrls.push(that.data.request + element + '.min.jpg');
|
||||||
}else{
|
} else {
|
||||||
fileUrls.push(element);
|
fileUrls.push(element);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
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({
|
that.setData({
|
||||||
infoData:res.data,
|
infoData: res.data,
|
||||||
detectionImageList:imageUrls,
|
attachments,
|
||||||
minDetectionFileImages:minImageUrls,
|
detectionImageList: imageUrls,
|
||||||
detectionFiles:fileUrls,
|
minDetectionFileImages: minImageUrls,
|
||||||
loadShow:false
|
detectionFiles: fileUrls,
|
||||||
|
loadShow: false
|
||||||
})
|
})
|
||||||
//判断当前能否删除
|
//判断当前能否删除
|
||||||
if(res.data.createBy==that.data.loginName){
|
if (res.data.createBy == that.data.loginName) {
|
||||||
that.setData({
|
that.setData({
|
||||||
showDel:true
|
showDel: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -98,17 +133,22 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
//保存
|
||||||
onSubmitSave(){
|
onSubmitSave() {
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:true
|
loadShow: true
|
||||||
})
|
})
|
||||||
let that = this
|
let that = this
|
||||||
let {id,detectionResult,detectionFileData,loginName} = that.data;
|
let {
|
||||||
|
id,
|
||||||
|
detectionResult,
|
||||||
|
detectionFileData,
|
||||||
|
loginName
|
||||||
|
} = that.data;
|
||||||
//数据效验
|
//数据效验
|
||||||
if(id==""||loginName==""){
|
if (id == "" || loginName == "") {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -119,57 +159,57 @@ Page({
|
||||||
// })
|
// })
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
if(detectionFileData.length==0){
|
if (detectionFileData.length == 0) {
|
||||||
app.toast("请上传检测报告!")
|
app.toast("请上传检测报告!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let _fileType = detectionFileData[0].path.split('.');
|
let _fileType = detectionFileData[0].path.split('.');
|
||||||
_fileType = _fileType[_fileType.length-1].toLowerCase();
|
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||||
if(this.data.fileType.indexOf(_fileType)==-1){
|
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||||
app.toast("检测报告不支持 [ "+_fileType+" ] 格式!")
|
app.toast("检测报告不支持 [ " + _fileType + " ] 格式!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
detectionFileData.forEach(async (item)=>{
|
detectionFileData.forEach(async (item) => {
|
||||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||||
let uploadName = "file"
|
let uploadName = "file"
|
||||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||||
let obj = await that.syncUploadImage(uploadUrl,item.path,uploadName);
|
let obj = await that.syncUploadImage(uploadUrl, item.path, uploadName);
|
||||||
let params = {
|
let params = {
|
||||||
id,
|
id,
|
||||||
checkState:"2",
|
checkState: "2",
|
||||||
//detectionResult,
|
//detectionResult,
|
||||||
detectionFile:obj.data.fileName,
|
detectionFile: obj.data.fileName,
|
||||||
approveStatus:"1",
|
approveStatus: "1",
|
||||||
updateBy:loginName
|
updateBy: loginName
|
||||||
}
|
}
|
||||||
|
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + "/wechat/projectDetection/edit",
|
url: app.globalData.reqUrl + "/wechat/projectDetection/edit",
|
||||||
method:"POST",
|
method: "POST",
|
||||||
data:params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"Username": loginName,
|
"Username": loginName,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
app.toast("提交成功!")
|
app.toast("提交成功!")
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: '../list/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -179,7 +219,7 @@ Page({
|
||||||
/**
|
/**
|
||||||
* 这里考虑上传图片异步问题,封装为同步
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
*/
|
*/
|
||||||
syncUploadImage(url,uploadFile,name) {
|
syncUploadImage(url, uploadFile, name) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url, // 上传的服务器接口地址
|
url, // 上传的服务器接口地址
|
||||||
|
|
@ -188,7 +228,9 @@ Page({
|
||||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||||
},
|
},
|
||||||
name, //上传的所需字段,后端提供
|
name, //上传的所需字段,后端提供
|
||||||
formData: { user: 'test' },
|
formData: {
|
||||||
|
user: 'test'
|
||||||
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 上传完成操作
|
// 上传完成操作
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
|
|
@ -210,7 +252,7 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onDelete(){
|
onDelete() {
|
||||||
//弹出确认
|
//弹出确认
|
||||||
let that = this
|
let that = this
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
|
|
@ -226,18 +268,20 @@ Page({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deleteData(){
|
deleteData() {
|
||||||
let {id} = this.data
|
let {
|
||||||
|
id
|
||||||
|
} = this.data
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectDetection/remove',
|
url: app.globalData.reqUrl + '/wechat/projectDetection/remove',
|
||||||
header: {
|
header: {
|
||||||
"Username": this.data.loginName,
|
"Username": this.data.loginName,
|
||||||
},
|
},
|
||||||
data:{
|
data: {
|
||||||
id:id
|
id: id
|
||||||
},
|
},
|
||||||
method:"get",
|
method: "get",
|
||||||
success(res){
|
success(res) {
|
||||||
app.toast("删除成功!")
|
app.toast("删除成功!")
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../list/index`,
|
url: `../list/index`,
|
||||||
|
|
@ -247,7 +291,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//跳转修改页面
|
//跳转修改页面
|
||||||
onUpdate:function(){
|
onUpdate: function () {
|
||||||
let id = this.data.id;
|
let id = this.data.id;
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../edit/index?id=${id}`,
|
url: `../edit/index?id=${id}`,
|
||||||
|
|
@ -255,27 +299,67 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//展示图片
|
//展示图片
|
||||||
showImg:function(e){
|
showImg: function (e) {
|
||||||
var that=this;
|
var that = this;
|
||||||
wx.previewImage({
|
wx.previewImage({
|
||||||
urls: that.data.imageList,
|
urls: that.data.imageList,
|
||||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//展示图片
|
||||||
|
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){
|
onSelect(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
detectionResult:e.detail.id
|
detectionResult: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
fileUpload(options){
|
fileUpload(options) {
|
||||||
let file=options.detail;
|
let file = options.detail;
|
||||||
this.setData({
|
this.setData({
|
||||||
detectionFileData: file
|
detectionFileData: file
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载附件
|
||||||
|
* @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 () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
|
|
@ -70,6 +70,27 @@
|
||||||
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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">
|
<view class="inspect_overview_list">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
||||||
|
|
|
||||||
|
|
@ -6,54 +6,74 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
id:"",
|
id: "",
|
||||||
maxDate:new Date(2088,1,1).getTime(),
|
maxDate: new Date(2088, 1, 1).getTime(),
|
||||||
currentDate:new Date().getTime(),
|
deptId: "",
|
||||||
deptId:"",
|
projectId: "",
|
||||||
projectId:"",
|
projectName: "",
|
||||||
projectName:"",
|
loginName: "",
|
||||||
loginName:"",
|
rectifierData: [],
|
||||||
rectifierData:[],
|
loadShow: false,
|
||||||
loadShow:false,
|
checkTypeList: [],
|
||||||
checkTypeList:[],
|
checkType: "1",
|
||||||
checkType:"1",
|
materialName: "",
|
||||||
materialName:"",
|
usePosition: "",
|
||||||
usePosition:"",
|
sampleNum: "",
|
||||||
sampleNum:"",
|
qualifiedFlag: "Y",
|
||||||
qualifiedFlag:"Y",
|
witnessUser: "",
|
||||||
witnessUser:"",
|
witnessUserName: "",
|
||||||
witnessUserName:"",
|
checkTime: "",
|
||||||
checkTime:"",
|
laboratoryName: "",
|
||||||
laboratoryName:"",
|
infoData: {},
|
||||||
infoData:{},
|
detectionFiles: "",
|
||||||
detectionFiles:"",
|
fileUrls: "",
|
||||||
fileUrls:"",
|
fileUrlArray: [],
|
||||||
fileUrlArray:[],
|
activeName: "",
|
||||||
activeName:"",
|
flowRecordList: [],
|
||||||
flowRecordList:[],
|
qualifiedFlagList: [{
|
||||||
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
|
id: 'Y',
|
||||||
detectionFileData:[],
|
text: "是"
|
||||||
fileType:["pdf","png","jpg","jpeg"],
|
}, {
|
||||||
request:app.globalData.reqUrl,
|
id: 'N',
|
||||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
text: "否"
|
||||||
active: 1
|
}],
|
||||||
|
detectionFileData: [],
|
||||||
|
fileType: ["pdf", "png", "jpg", "jpeg"],
|
||||||
|
request: app.globalData.reqUrl,
|
||||||
|
flowNodes: [{
|
||||||
|
text: '开始'
|
||||||
|
}, {
|
||||||
|
text: '提交申请'
|
||||||
|
}, {
|
||||||
|
text: '检测报告'
|
||||||
|
}, {
|
||||||
|
text: '监理审批'
|
||||||
|
}, {
|
||||||
|
text: '结束'
|
||||||
|
}],
|
||||||
|
active: 1,
|
||||||
|
trustDeed: [],
|
||||||
|
attachments: [],
|
||||||
|
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let {id} = options
|
let {
|
||||||
|
id
|
||||||
|
} = options
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
id,
|
id,
|
||||||
projectId:app.globalData.projectId,
|
projectId: app.globalData.projectId,
|
||||||
projectName:app.globalData.projectName,
|
projectName: app.globalData.projectName,
|
||||||
deptId:res.data.deptId,
|
deptId: res.data.deptId,
|
||||||
loginName:res.data.loginName,
|
loginName: res.data.loginName,
|
||||||
})
|
})
|
||||||
this.getProjectUserData();
|
this.getProjectUserData();
|
||||||
this.getTypeList();
|
this.getTypeList();
|
||||||
|
|
@ -64,47 +84,50 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询项目人员数据
|
//查询项目人员数据
|
||||||
getProjectUserData(){
|
getProjectUserData() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
unitType:"4",
|
unitType: "4",
|
||||||
projectId:that.data.projectId
|
projectId: that.data.projectId
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
that.setData({
|
that.setData({
|
||||||
rectifierData:res.data
|
rectifierData: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getTypeList(){
|
getTypeList() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectDetection/queryType',
|
url: app.globalData.reqUrl + '/wechat/projectDetection/queryType',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{},
|
data: {},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let list=[];
|
let list = [];
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it => {
|
||||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
list.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
checkTypeList:list
|
checkTypeList: list
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -115,46 +138,72 @@ Page({
|
||||||
* 获取安全检查详情信息
|
* 获取安全检查详情信息
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getInfo(){
|
getInfo() {
|
||||||
let {id} = this.data
|
let {
|
||||||
|
id
|
||||||
|
} = this.data
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectDetection/info',
|
url: app.globalData.reqUrl + '/wechat/projectDetection/info',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
id:id
|
id: id
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let fileUrls = [];
|
let fileUrls = [];
|
||||||
let fileNames = [];
|
let fileNames = [];
|
||||||
let fileUrlArray=[];
|
let fileUrlArray = [];
|
||||||
//判断附件
|
//判断附件
|
||||||
if(res.data.detectionFile){
|
if (res.data.detectionFile) {
|
||||||
res.data.detectionFile.split(',').forEach(element => {
|
res.data.detectionFile.split(',').forEach(element => {
|
||||||
let it = element.split('/');
|
let it = element.split('/');
|
||||||
fileNames.push(it[it.length-1]);
|
fileNames.push(it[it.length - 1]);
|
||||||
fileUrls.push(element);
|
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({
|
that.setData({
|
||||||
infoData:res.data,
|
infoData: res.data,
|
||||||
detectionFiles:fileNames,
|
trustDeed,
|
||||||
|
attachments,
|
||||||
|
detectionFiles: fileNames,
|
||||||
fileUrlArray,
|
fileUrlArray,
|
||||||
fileUrls,
|
fileUrls,
|
||||||
detectionFileData:fileUrlArray,
|
detectionFileData: fileUrlArray,
|
||||||
checkType:res.data.checkType,
|
checkType: res.data.checkType,
|
||||||
materialName:res.data.materialName,
|
materialName: res.data.materialName,
|
||||||
usePosition:res.data.usePosition,
|
usePosition: res.data.usePosition,
|
||||||
sampleNum:res.data.sampleNum,
|
sampleNum: res.data.sampleNum,
|
||||||
qualifiedFlag:res.data.qualifiedFlag,
|
qualifiedFlag: res.data.qualifiedFlag,
|
||||||
witnessUser:res.data.witnessUser,
|
witnessUser: res.data.witnessUser,
|
||||||
witnessUserName:res.data.witnessUserName,
|
witnessUserName: res.data.witnessUserName,
|
||||||
checkTime:res.data.checkTime,
|
checkTime: res.data.checkTime,
|
||||||
laboratoryName:res.data.laboratoryName,
|
laboratoryName: res.data.laboratoryName,
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -164,28 +213,28 @@ Page({
|
||||||
/**
|
/**
|
||||||
* 查询流程日志
|
* 查询流程日志
|
||||||
*/
|
*/
|
||||||
getAuditinfo(){
|
getAuditinfo() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
fromType:"1",
|
fromType: "1",
|
||||||
fromId:this.data.id
|
fromId: this.data.id
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
that.setData({
|
that.setData({
|
||||||
flowRecordList:res.data
|
flowRecordList: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
fileUpload(options){
|
fileUpload(options) {
|
||||||
let file=options.detail;
|
let file = options.detail;
|
||||||
this.setData({
|
this.setData({
|
||||||
detectionFileData: file
|
detectionFileData: file
|
||||||
});
|
});
|
||||||
|
|
@ -199,7 +248,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//材料名称
|
//材料名称
|
||||||
onInputMaterialNameValue(e){
|
onInputMaterialNameValue(e) {
|
||||||
let materialName = e.detail.value
|
let materialName = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
materialName
|
materialName
|
||||||
|
|
@ -207,21 +256,21 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//使用部位
|
//使用部位
|
||||||
onInputUsePositionValue(e){
|
onInputUsePositionValue(e) {
|
||||||
let usePosition = e.detail.value
|
let usePosition = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
usePosition
|
usePosition
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//取样数量
|
//取样数量
|
||||||
onInputSampleNumValue(e){
|
onInputSampleNumValue(e) {
|
||||||
let sampleNum = e.detail.value
|
let sampleNum = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
sampleNum
|
sampleNum
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//送检实验室名称
|
//送检实验室名称
|
||||||
onInputLaboratoryNameValue(e){
|
onInputLaboratoryNameValue(e) {
|
||||||
let laboratoryName = e.detail.value
|
let laboratoryName = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
laboratoryName
|
laboratoryName
|
||||||
|
|
@ -229,7 +278,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//验收时间
|
//验收时间
|
||||||
onInputTime(e){
|
onInputTime(e) {
|
||||||
let checkTime = e.detail
|
let checkTime = e.detail
|
||||||
this.setData({
|
this.setData({
|
||||||
checkTime
|
checkTime
|
||||||
|
|
@ -237,38 +286,40 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//添加监理专员
|
//添加监理专员
|
||||||
onAddSend(e){
|
onAddSend(e) {
|
||||||
if(e.detail.length>0){
|
if (e.detail.length > 0) {
|
||||||
let phoneNumbers="";
|
let phoneNumbers = "";
|
||||||
let userNames="";
|
let userNames = "";
|
||||||
e.detail.forEach(it =>{
|
e.detail.forEach(it => {
|
||||||
phoneNumbers+=","+it.phoneNumber;
|
phoneNumbers += "," + it.phoneNumber;
|
||||||
userNames+=","+it.userName;
|
userNames += "," + it.userName;
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
witnessUserName:userNames.substring(1),
|
witnessUserName: userNames.substring(1),
|
||||||
witnessUser:phoneNumbers.substring(1)
|
witnessUser: phoneNumbers.substring(1)
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
this.setData({
|
this.setData({
|
||||||
witnessUser:"",
|
witnessUser: "",
|
||||||
witnessUserName:""
|
witnessUserName: ""
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
//取消页面
|
||||||
cancelSaveView(){
|
cancelSaveView() {
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
//保存
|
||||||
onSubmitSave(){
|
onSubmitSave() {
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:true
|
loadShow: true
|
||||||
})
|
})
|
||||||
let that = this
|
let that = this
|
||||||
let {id,checkType,
|
let {
|
||||||
|
id,
|
||||||
|
checkType,
|
||||||
materialName,
|
materialName,
|
||||||
usePosition,
|
usePosition,
|
||||||
sampleNum,
|
sampleNum,
|
||||||
|
|
@ -276,108 +327,130 @@ Page({
|
||||||
witnessUser,
|
witnessUser,
|
||||||
witnessUserName,
|
witnessUserName,
|
||||||
checkTime,
|
checkTime,
|
||||||
laboratoryName,loginName,detectionFileData} = that.data;
|
laboratoryName,
|
||||||
|
loginName,
|
||||||
|
detectionFileData,
|
||||||
|
trustDeed,
|
||||||
|
attachments
|
||||||
|
} = that.data;
|
||||||
//数据效验
|
//数据效验
|
||||||
if(id==""){
|
if (id == "") {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkType==""){
|
if (checkType == "") {
|
||||||
app.toast("请选择送检类型!")
|
app.toast("请选择送检类型!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(materialName==""){
|
if (materialName == "") {
|
||||||
app.toast("请填写材料名称!")
|
app.toast("请填写材料名称!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(sampleNum==""){
|
if (sampleNum == "") {
|
||||||
app.toast("请填写取样数量!")
|
app.toast("请填写取样数量!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(usePosition==""){
|
if (usePosition == "") {
|
||||||
app.toast("请填写使用部位!")
|
app.toast("请填写使用部位!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(qualifiedFlag==""){
|
if (qualifiedFlag == "") {
|
||||||
app.toast("请选择是否提供合格证!")
|
app.toast("请选择是否提供合格证!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(qualifiedFlag==""){
|
if (qualifiedFlag == "") {
|
||||||
app.toast("请选择是否提供合格证!")
|
app.toast("请选择是否提供合格证!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(witnessUser==""||witnessUserName==""){
|
if (witnessUser == "" || witnessUserName == "") {
|
||||||
app.toast("请选择见证人!")
|
app.toast("请选择见证人!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkTime==""){
|
if (checkTime == "") {
|
||||||
app.toast("请选择送检时间!")
|
app.toast("请选择送检时间!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(laboratoryName==""){
|
if (laboratoryName == "") {
|
||||||
app.toast("请填写送检实验室名称!")
|
app.toast("请填写送检实验室名称!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(this.data.infoData.detectionFile!=null && detectionFileData.length==0){
|
if (trustDeed.length == 0) {
|
||||||
app.toast("请上传检测报告!")
|
app.toast("请上传送检委托单!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let path=this.data.infoData.detectionFile;
|
if (attachments.length > 0) {
|
||||||
if(detectionFileData.length>0){
|
for (let i = 0; i < attachments.length; i++) {
|
||||||
let _fileType = detectionFileData[0].path.split('.');
|
let _fileType = attachments[i].path.split('.');
|
||||||
_fileType = _fileType[_fileType.length-1].toLowerCase();
|
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||||
if(this.data.fileType.indexOf(_fileType)==-1){
|
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||||
app.toast("检测报告不支持 [ "+_fileType+" ] 格式!")
|
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
});
|
});
|
||||||
return;
|
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;
|
|
||||||
}
|
}
|
||||||
|
if (this.data.infoData.detectionFile != null && detectionFileData.length == 0) {
|
||||||
|
app.toast("请上传检测报告!")
|
||||||
|
that.setData({
|
||||||
|
loadShow: false
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let path = "";
|
||||||
|
if (detectionFileData.length > 0) {
|
||||||
|
let _fileType = detectionFileData[0].path.split('.');
|
||||||
|
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||||
|
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||||
|
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||||
|
app.toast("检测报告不支持 [ " + _fileType + " ] 格式!")
|
||||||
|
that.setData({
|
||||||
|
loadShow: false
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//检验委托单
|
||||||
|
let trustDeedImages = [];
|
||||||
|
//其它附件
|
||||||
|
let attachmentFiles = [];
|
||||||
|
//检测报告
|
||||||
|
let detectionFiles = [];
|
||||||
let params = {
|
let params = {
|
||||||
id,
|
id,
|
||||||
checkType,
|
checkType,
|
||||||
|
|
@ -387,42 +460,107 @@ Page({
|
||||||
qualifiedFlag,
|
qualifiedFlag,
|
||||||
witnessUser,
|
witnessUser,
|
||||||
witnessUserName,
|
witnessUserName,
|
||||||
checkTime:checkTime+":00",
|
checkTime: checkTime,
|
||||||
laboratoryName,
|
laboratoryName,
|
||||||
updateBy:loginName,
|
updateBy: loginName,
|
||||||
detectionFile:path,
|
approveStatus: that.data.approveStatus == null ? null : "1"
|
||||||
approveStatus:path==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({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/projectDetection/edit',
|
url: app.globalData.reqUrl + '/wechat/projectDetection/edit',
|
||||||
method:"POST",
|
method: "POST",
|
||||||
data:params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"Username": loginName,
|
"Username": that.data.loginName,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
app.toast("修改成功!")
|
app.toast("修改成功!")
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: '../list/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 这里考虑上传图片异步问题,封装为同步
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
*/
|
*/
|
||||||
syncUploadImage(url,uploadFile,name) {
|
syncUploadImage(url, uploadFile, name) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url, // 上传的服务器接口地址
|
url, // 上传的服务器接口地址
|
||||||
|
|
@ -431,7 +569,9 @@ Page({
|
||||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||||
},
|
},
|
||||||
name, //上传的所需字段,后端提供
|
name, //上传的所需字段,后端提供
|
||||||
formData: { user: 'test' },
|
formData: {
|
||||||
|
user: 'test'
|
||||||
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 上传完成操作
|
// 上传完成操作
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
|
|
@ -454,18 +594,36 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//选择检测类型
|
//选择检测类型
|
||||||
onSelectCheckType(e){
|
onSelectCheckType(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
checkType:e.detail.id
|
checkType: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//选择是否提供合格证
|
//选择是否提供合格证
|
||||||
onSelectQualifiedFlag(e){
|
onSelectQualifiedFlag(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
qualified:e.detail.id
|
qualified: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// list 上传图片
|
||||||
|
onImagesArr(e) {
|
||||||
|
this.setData({
|
||||||
|
trustDeed: e.detail
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关附件上传
|
||||||
|
* @param {*} options
|
||||||
|
*/
|
||||||
|
otherFileUpload(options) {
|
||||||
|
let file = options.detail;
|
||||||
|
this.setData({
|
||||||
|
attachments: file
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
returnToPage: function () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="4">
|
<van-col span="4">
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage">
|
||||||
|
<image src="/images/left.png"></image>
|
||||||
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="15">
|
<van-col span="15">
|
||||||
<view class="header_name">修改取样复试</view>
|
<view class="header_name">修改取样复试</view>
|
||||||
|
|
@ -36,10 +38,18 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_list_info gk_open_con">
|
<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.userName}}">
|
||||||
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view>
|
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
|
||||||
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view>
|
</view>
|
||||||
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view>
|
<view wx:if="{{item.deptName}}">
|
||||||
|
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
|
||||||
|
</view>
|
||||||
|
<view wx:if="{{item.comment}}">
|
||||||
|
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -50,32 +60,31 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">送检类型</view>
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">送检类型</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{checkTypeList}}" selectValue="{{infoData.checkType}}" placeholder="请选择送检类型" bindchange="onSelectCheckType" ></voucher-select>
|
<voucher-select columns="{{checkTypeList}}" selectValue="{{infoData.checkType}}" placeholder="请选择送检类型" bindchange="onSelectCheckType"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">材料名称</view>
|
<view class="inspect_info_title">材料名称</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" model:value="{{infoData.materialName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" model:value="{{infoData.materialName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">取样数量</view>
|
<view class="inspect_info_title">取样数量</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" model:value="{{infoData.sampleNum}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" model:value="{{infoData.sampleNum}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">使用部位</view>
|
<view class="inspect_info_title">使用部位</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<textarea class="add_textarea" placeholder="请填写使用部位" model:value="{{infoData.usePosition}}"
|
<textarea class="add_textarea" placeholder="请填写使用部位" model:value="{{infoData.usePosition}}" placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200" />
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200"/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">是否提供合格证</view>
|
<view class="inspect_info_title">是否提供合格证</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" selectValue="{{infoData.qualifiedFlag}}" bindchange="onSelectQualifiedFlag" ></voucher-select>
|
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" selectValue="{{infoData.qualifiedFlag}}" bindchange="onSelectQualifiedFlag"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
|
|
@ -88,17 +97,29 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">送检时间</view>
|
<view class="inspect_info_title">送检时间</view>
|
||||||
<view class="inspect_info_content">
|
<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>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">送检实验室名称</view>
|
<view class="inspect_info_title">送检实验室名称</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" model:value="{{infoData.laboratoryName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" model:value="{{infoData.laboratoryName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_overview" wx:if="{{infoData.detectionFile!=nulll}}">
|
<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">
|
<view class="safety_inspect_title module_title_flex module_title_padding">
|
||||||
<view>登记取样复试结果</view>
|
<view>登记取样复试结果</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -111,12 +132,12 @@
|
||||||
<file-uploader-all bindfiles="fileUpload" limit="{{1}}" fileUrlArray="{{fileUrlArray}}"></file-uploader-all>
|
<file-uploader-all bindfiles="fileUpload" limit="{{1}}" fileUrlArray="{{fileUrlArray}}"></file-uploader-all>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_submit_to">
|
<view class="problem_submit_to">
|
||||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交</view>
|
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-overlay show="{{loadShow}}">
|
<van-overlay show="{{loadShow}}">
|
||||||
|
|
@ -125,51 +146,3 @@
|
||||||
<view>数据加载中!请稍后...</view>
|
<view>数据加载中!请稍后...</view>
|
||||||
</view>
|
</view>
|
||||||
</van-overlay>
|
</van-overlay>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ Page({
|
||||||
}, {
|
}, {
|
||||||
text: '结束'
|
text: '结束'
|
||||||
}],
|
}],
|
||||||
active: 100
|
active: 100,
|
||||||
|
attachments:[],
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -74,7 +75,7 @@ Page({
|
||||||
let state = that.data.active;
|
let state = that.data.active;
|
||||||
if (res.data.approveStatus == null) {
|
if (res.data.approveStatus == null) {
|
||||||
state = 2;
|
state = 2;
|
||||||
}else if (res.data.approveStatus == "1") {
|
} else if (res.data.approveStatus == "1") {
|
||||||
state = 3;
|
state = 3;
|
||||||
} else if (res.data.approveStatus == "3") {
|
} else if (res.data.approveStatus == "3") {
|
||||||
state = 2;
|
state = 2;
|
||||||
|
|
@ -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({
|
that.setData({
|
||||||
infoData: res.data,
|
infoData: res.data,
|
||||||
|
attachments,
|
||||||
detectionImageList: imageUrls,
|
detectionImageList: imageUrls,
|
||||||
minDetectionFileImages: minImageUrls,
|
minDetectionFileImages: minImageUrls,
|
||||||
detectionFiles: fileNames,
|
detectionFiles: fileNames,
|
||||||
|
|
@ -227,6 +242,46 @@ Page({
|
||||||
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
|
//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 () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="4">
|
<van-col span="4">
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage">
|
||||||
|
<image src="/images/left.png"></image>
|
||||||
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="15">
|
<van-col span="15">
|
||||||
<view class="header_name">取样复试详情</view>
|
<view class="header_name">取样复试详情</view>
|
||||||
|
|
@ -33,10 +35,18 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_list_info gk_open_con">
|
<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.userName}}">
|
||||||
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view>
|
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
|
||||||
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view>
|
</view>
|
||||||
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view>
|
<view wx:if="{{item.deptName}}">
|
||||||
|
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
|
||||||
|
</view>
|
||||||
|
<view wx:if="{{item.comment}}">
|
||||||
|
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -99,6 +109,27 @@
|
||||||
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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">
|
<view class="inspect_overview_list">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
||||||
|
|
@ -146,7 +177,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="in-img-div" wx:if="{{detectionFiles.length>0}}">
|
<view class="in-img-div" wx:if="{{detectionFiles.length>0}}">
|
||||||
<image src='https://szgcwx.jhncidg.com/staticFiles/icon/pdf.png'></image>
|
<image src='https://szgcwx.jhncidg.com/staticFiles/icon/pdf.png'></image>
|
||||||
<text class="files" style="color:#89a3ed;margin-left:50rpx;" bindtap='downFile' data-index="{{0}}" >下载附件</text>
|
<text class="files" style="color:#89a3ed;margin-left:50rpx;" bindtap='downFile' data-index="{{0}}">下载附件</text>
|
||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
|
|
@ -169,4 +200,3 @@
|
||||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
|
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/securityCheckGR/index.js
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -58,6 +60,11 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../pages/login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
if (options && options.barProId) {
|
if (options && options.barProId) {
|
||||||
//数据未加载完毕,从文件读取数据
|
//数据未加载完毕,从文件读取数据
|
||||||
if (app.globalData.projectInfoList.length == 0) {
|
if (app.globalData.projectInfoList.length == 0) {
|
||||||
|
|
@ -87,12 +94,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
fail: err => {
|
myProjects.load();
|
||||||
//未获取用户信息时,重新登录
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../pages/login/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<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="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
<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 class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/addSafetyInspect/index.js
|
import {
|
||||||
|
syncFileUpload
|
||||||
|
} from '../../../utils/request'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -6,51 +8,70 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
maxDate:new Date(2088,1,1).getTime(),
|
maxDate: new Date(2088, 1, 1).getTime(),
|
||||||
currentDate:new Date().getTime(),
|
minDate: new Date(2001, 1, 1).getTime(),
|
||||||
deptId:"",
|
deptId: "",
|
||||||
projectId:"",
|
projectId: "",
|
||||||
projectName:"",
|
projectName: "",
|
||||||
loginName:"",
|
loginName: "",
|
||||||
userName:"",
|
userName: "",
|
||||||
rectifierData:[],
|
rectifierData: [],
|
||||||
rectifierData2:[],
|
rectifierData2: [],
|
||||||
imageInfoData:[],
|
imageInfoData: [],
|
||||||
checkingResult:"1",
|
checkingResult: "1",
|
||||||
//验收时间
|
//验收时间
|
||||||
checkTime:'',
|
checkTime: '',
|
||||||
loadShow:false,
|
loadShow: false,
|
||||||
qualityUser:"",
|
qualityUser: "",
|
||||||
qualityUserName:"",
|
qualityUserName: "",
|
||||||
superviseUser:"",
|
superviseUser: "",
|
||||||
superviseUserName:"",
|
superviseUserName: "",
|
||||||
checkWorkingPosition:"",
|
checkWorkingPosition: "",
|
||||||
intro:"",
|
intro: "",
|
||||||
dataTypeLvl1:"1",
|
dataTypeLvl1: "1",
|
||||||
dataTypeLvl2:"",
|
dataTypeLvl2: "",
|
||||||
dataTypeLvl1List:[],
|
dataTypeLvl1List: [],
|
||||||
dataTypeLvl2List:[],
|
dataTypeLvl2List: [],
|
||||||
dataTypeLvl2AllList:[],
|
dataTypeLvl2AllList: [],
|
||||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
list: [{
|
||||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
id: 1,
|
||||||
active: 0
|
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) {
|
onLoad(options) {
|
||||||
let {projectId,projectName} = options
|
let {
|
||||||
|
projectId,
|
||||||
|
projectName
|
||||||
|
} = options
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
projectId,
|
projectId,
|
||||||
projectName,
|
projectName,
|
||||||
deptId:res.data.deptId,
|
deptId: res.data.deptId,
|
||||||
loginName:res.data.loginName,
|
loginName: res.data.loginName,
|
||||||
userName:res.data.nickName
|
userName: res.data.nickName
|
||||||
})
|
})
|
||||||
this.getProjectUserData();
|
this.getProjectUserData();
|
||||||
this.getDataTypeLvlList();
|
this.getDataTypeLvlList();
|
||||||
|
|
@ -59,45 +80,45 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询项目人员数据
|
//查询项目人员数据
|
||||||
getProjectUserData(){
|
getProjectUserData() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
unitType:"4",
|
unitType: "4",
|
||||||
projectId:that.data.projectId
|
projectId: that.data.projectId
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let tempData = []
|
let tempData = []
|
||||||
that.setData({
|
that.setData({
|
||||||
rectifierData:res.data,
|
rectifierData: res.data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
unitType:"2",
|
unitType: "2",
|
||||||
projectId:that.data.projectId
|
projectId: that.data.projectId
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let tempData = []
|
let tempData = []
|
||||||
that.setData({
|
that.setData({
|
||||||
rectifierData2:res.data,
|
rectifierData2: res.data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -105,53 +126,59 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询验收类型数据
|
//查询验收类型数据
|
||||||
getDataTypeLvlList(){
|
getDataTypeLvlList() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
type:"project_checking_data_type_lvl1"
|
type: "project_checking_data_type_lvl1"
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let list=[];
|
let list = [];
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it => {
|
||||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
list.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
dataTypeLvl1List:list,
|
dataTypeLvl1List: list,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
type:"project_checking_data_type_lvl2"
|
type: "project_checking_data_type_lvl2"
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let tempData = []
|
let tempData = []
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it => {
|
||||||
if(it.remark=="1"){
|
if (it.remark == "1") {
|
||||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
tempData.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
dataTypeLvl2List:tempData,
|
dataTypeLvl2List: tempData,
|
||||||
dataTypeLvl2AllList:res.data,
|
dataTypeLvl2AllList: res.data,
|
||||||
dataTypeLvl2:tempData[0].id,
|
dataTypeLvl2: tempData[0].id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -159,42 +186,45 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//切换验收结果
|
//切换验收结果
|
||||||
onSelectType(e){
|
onSelectType(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
checkingResult:e.detail.id
|
checkingResult: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//验收类型
|
//验收类型
|
||||||
onSelectTypeLvl1(e){
|
onSelectTypeLvl1(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
dataTypeLvl1:e.detail.id
|
dataTypeLvl1: e.detail.id
|
||||||
})
|
})
|
||||||
let tempData = []
|
let tempData = []
|
||||||
this.data.dataTypeLvl2AllList.forEach(it =>{
|
this.data.dataTypeLvl2AllList.forEach(it => {
|
||||||
if(it.remark==e.detail.id){
|
if (it.remark == e.detail.id) {
|
||||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
tempData.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
dataTypeLvl2List:tempData,
|
dataTypeLvl2List: tempData,
|
||||||
dataTypeLvl2:tempData[0].id,
|
dataTypeLvl2: tempData[0].id,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//类型分类
|
//类型分类
|
||||||
onSelectTypeLvl2(e){
|
onSelectTypeLvl2(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
dataTypeLvl2:e.detail.id
|
dataTypeLvl2: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//工序部位
|
//工序部位
|
||||||
onInputCheckWorkingPositionValue(e){
|
onInputCheckWorkingPositionValue(e) {
|
||||||
let checkWorkingPosition = e.detail.value
|
let checkWorkingPosition = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
checkWorkingPosition
|
checkWorkingPosition
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//验收描述
|
//验收描述
|
||||||
onInputIntroValue(e){
|
onInputIntroValue(e) {
|
||||||
let intro = e.detail.value
|
let intro = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
intro
|
intro
|
||||||
|
|
@ -202,7 +232,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//验收时间
|
//验收时间
|
||||||
onInputTime(e){
|
onInputTime(e) {
|
||||||
let checkTime = e.detail
|
let checkTime = e.detail
|
||||||
this.setData({
|
this.setData({
|
||||||
checkTime
|
checkTime
|
||||||
|
|
@ -210,107 +240,124 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
// list 上传图片
|
// list 上传图片
|
||||||
onImagesArr(e){
|
onImagesArr(e) {
|
||||||
var data = this.data.imageInfoData
|
var data = this.data.imageInfoData
|
||||||
data = e.detail
|
data = e.detail
|
||||||
this.setData({
|
this.setData({
|
||||||
imageInfoData:data
|
imageInfoData: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//添加质量专员
|
//添加质量专员
|
||||||
onAddQualityUser(e){
|
onAddQualityUser(e) {
|
||||||
if(e.detail.length>0){
|
if (e.detail.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
qualityUser:e.detail[0].phoneNumber,
|
qualityUser: e.detail[0].phoneNumber,
|
||||||
qualityUserName:e.detail[0].userName
|
qualityUserName: e.detail[0].userName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//添加监理专员
|
//添加监理专员
|
||||||
onAddSuperviseUser(e){
|
onAddSuperviseUser(e) {
|
||||||
if(e.detail.length>0){
|
if (e.detail.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
superviseUser:e.detail[0].phoneNumber,
|
superviseUser: e.detail[0].phoneNumber,
|
||||||
superviseUserName:e.detail[0].userName
|
superviseUserName: e.detail[0].userName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
//取消页面
|
||||||
cancelSaveView(){
|
cancelSaveView() {
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
//保存
|
||||||
onProblemSubmitSave(){
|
onProblemSubmitSave() {
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:true
|
loadShow: true
|
||||||
})
|
})
|
||||||
let that = this
|
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==""){
|
if (projectId == "" || deptId == "" || loginName == "") {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(imageInfoData.length==0){
|
if (imageInfoData.length == 0) {
|
||||||
app.toast("请上传举牌验收现场图片!")
|
app.toast("请上传举牌验收现场图片!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(dataTypeLvl1==""){
|
if (dataTypeLvl1 == "") {
|
||||||
app.toast("请选择验收类型!")
|
app.toast("请选择验收类型!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(dataTypeLvl2==""){
|
if (dataTypeLvl2 == "") {
|
||||||
app.toast("请选择类型分类!")
|
app.toast("请选择类型分类!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(qualityUser==""||qualityUserName==""){
|
if (qualityUser == "" || qualityUserName == "") {
|
||||||
app.toast("请选择质量专员!")
|
app.toast("请选择质量专员!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(superviseUser==""||superviseUserName==""){
|
if (superviseUser == "" || superviseUserName == "") {
|
||||||
app.toast("请选择监理专员!")
|
app.toast("请选择监理专员!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkWorkingPosition==""){
|
if (checkWorkingPosition == "") {
|
||||||
app.toast("请填写验收工序部位!")
|
app.toast("请填写验收工序部位!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(intro==""){
|
if (intro == "") {
|
||||||
app.toast("请填写验收结果描述!")
|
app.toast("请填写验收结果描述!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkTime==""){
|
if (checkTime == "") {
|
||||||
app.toast("请选择验收时间!")
|
app.toast("请选择验收时间!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -321,64 +368,99 @@ Page({
|
||||||
// })
|
// })
|
||||||
// return;
|
// 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 fileUrls = [];
|
||||||
imageInfoData.forEach(async (item)=>{
|
let _checkingFiles = [];
|
||||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
imageInfoData.forEach(async (item) => {
|
||||||
|
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||||
let name = "file"
|
let name = "file"
|
||||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||||
fileUrls.push(obj.data.fileName);
|
fileUrls.push(obj.data.fileName);
|
||||||
//验证图片上传完毕
|
//验证图片上传完毕
|
||||||
if(fileUrls.length == imageInfoData.length){
|
if (fileUrls.length == imageInfoData.length) {
|
||||||
let params = {
|
let params = {
|
||||||
projectId,
|
projectId,
|
||||||
deptId:deptId,
|
deptId: deptId,
|
||||||
qualityUser,
|
qualityUser,
|
||||||
qualityUserName,
|
qualityUserName,
|
||||||
superviseUser,
|
superviseUser,
|
||||||
superviseUserName,
|
superviseUserName,
|
||||||
checkWorkingPosition,
|
checkWorkingPosition,
|
||||||
intro,
|
intro,
|
||||||
checkingDate:checkTime,
|
checkingDate: checkTime,
|
||||||
//checkResult:checkingResult,
|
//checkResult:checkingResult,
|
||||||
approveStatus:"1",
|
approveStatus: "1",
|
||||||
createBy:loginName,
|
createBy: loginName,
|
||||||
imageUrls:fileUrls.toString(),
|
imageUrls: fileUrls.toString(),
|
||||||
dataTypeLvl1,
|
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({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/projectchecking/add',
|
url: app.globalData.reqUrl + '/wechat/projectchecking/add',
|
||||||
method:"POST",
|
method: "POST",
|
||||||
data:params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"Username": loginName,
|
"Username": that.data.loginName,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
res =res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
app.toast("添加成功!")
|
app.toast("添加成功!")
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: '../list/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 这里考虑上传图片异步问题,封装为同步
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
*/
|
*/
|
||||||
syncUploadImage(url,uploadFile,name) {
|
syncUploadImage(url, uploadFile, name) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url, // 上传的服务器接口地址
|
url, // 上传的服务器接口地址
|
||||||
|
|
@ -387,7 +469,9 @@ Page({
|
||||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||||
},
|
},
|
||||||
name, //上传的所需字段,后端提供
|
name, //上传的所需字段,后端提供
|
||||||
formData: { user: 'test' },
|
formData: {
|
||||||
|
user: 'test'
|
||||||
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 上传完成操作
|
// 上传完成操作
|
||||||
const data = JSON.parse(res.data)
|
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 () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -65,9 +65,16 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">验收时间</view>
|
<view class="inspect_info_title">验收时间</view>
|
||||||
<view class="inspect_info_content">
|
<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>
|
</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_list" wx:if="{{false}}">
|
||||||
<view class="inspect_info_title">验收结果</view>
|
<view class="inspect_info_title">验收结果</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/addSafetyInspect/index.js
|
import {
|
||||||
|
syncFileUpload
|
||||||
|
} from '../../../utils/request'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -6,57 +8,77 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
maxDate:new Date(2088,1,1).getTime(),
|
maxDate: new Date(2088, 1, 1).getTime(),
|
||||||
currentDate:new Date().getTime(),
|
deptId: "",
|
||||||
deptId:"",
|
projectId: "",
|
||||||
projectId:"",
|
projectName: "",
|
||||||
projectName:"",
|
loginName: "",
|
||||||
loginName:"",
|
userName: "",
|
||||||
userName:"",
|
rectifierData: [],
|
||||||
rectifierData:[],
|
rectifierData2: [],
|
||||||
rectifierData2:[],
|
imageInfoData: [],
|
||||||
imageInfoData:[],
|
checkingResult: "1",
|
||||||
checkingResult:"1",
|
|
||||||
//验收时间
|
//验收时间
|
||||||
checkTime:'',
|
checkTime: '',
|
||||||
loadShow:false,
|
loadShow: false,
|
||||||
qualityUser:"",
|
qualityUser: "",
|
||||||
qualityUserName:"",
|
qualityUserName: "",
|
||||||
superviseUser:"",
|
superviseUser: "",
|
||||||
superviseUserName:"",
|
superviseUserName: "",
|
||||||
checkWorkingPosition:"",
|
checkWorkingPosition: "",
|
||||||
intro:"",
|
intro: "",
|
||||||
infoData:{},
|
infoData: {},
|
||||||
activeName:"",
|
activeName: "",
|
||||||
flowRecordList:[],
|
flowRecordList: [],
|
||||||
minUrls:[],
|
minUrls: [],
|
||||||
dataTypeLvl1:"",
|
dataTypeLvl1: "",
|
||||||
dataTypeLvl2:"",
|
dataTypeLvl2: "",
|
||||||
dataTypeLvl1List:[],
|
dataTypeLvl1List: [],
|
||||||
dataTypeLvl2List:[],
|
dataTypeLvl2List: [],
|
||||||
dataTypeLvl2AllList:[],
|
dataTypeLvl2AllList: [],
|
||||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
list: [{
|
||||||
request:app.globalData.reqUrl,
|
id: 1,
|
||||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
text: "合格"
|
||||||
active: 1
|
}, {
|
||||||
|
id: 2,
|
||||||
|
text: "不合格"
|
||||||
|
}],
|
||||||
|
request: app.globalData.reqUrl,
|
||||||
|
flowNodes: [{
|
||||||
|
text: '开始'
|
||||||
|
}, {
|
||||||
|
text: '提交申请'
|
||||||
|
}, {
|
||||||
|
text: '监理审批'
|
||||||
|
}, {
|
||||||
|
text: '结束'
|
||||||
|
}],
|
||||||
|
active: 1,
|
||||||
|
checkingFiles: "",
|
||||||
|
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"],
|
||||||
|
fileUrlArray: []
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let {id,dt1} = options
|
let {
|
||||||
|
id,
|
||||||
|
dt1
|
||||||
|
} = options
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
id,dt1,
|
id,
|
||||||
projectId:app.globalData.projectId,
|
dt1,
|
||||||
projectName:app.globalData.projectName,
|
projectId: app.globalData.projectId,
|
||||||
deptId:res.data.deptId,
|
projectName: app.globalData.projectName,
|
||||||
loginName:res.data.loginName,
|
deptId: res.data.deptId,
|
||||||
userName:res.data.nickName
|
loginName: res.data.loginName,
|
||||||
|
userName: res.data.nickName
|
||||||
})
|
})
|
||||||
this.getProjectUserData();
|
this.getProjectUserData();
|
||||||
this.getDataTypeLvlList();
|
this.getDataTypeLvlList();
|
||||||
|
|
@ -67,45 +89,45 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询项目人员数据
|
//查询项目人员数据
|
||||||
getProjectUserData(){
|
getProjectUserData() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
unitType:"4",
|
unitType: "4",
|
||||||
projectId:that.data.projectId
|
projectId: that.data.projectId
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let tempData = []
|
let tempData = []
|
||||||
that.setData({
|
that.setData({
|
||||||
rectifierData:res.data,
|
rectifierData: res.data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
unitType:"2",
|
unitType: "2",
|
||||||
projectId:that.data.projectId
|
projectId: that.data.projectId
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let tempData = []
|
let tempData = []
|
||||||
that.setData({
|
that.setData({
|
||||||
rectifierData2:res.data,
|
rectifierData2: res.data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -113,53 +135,59 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询验收类型数据
|
//查询验收类型数据
|
||||||
getDataTypeLvlList(){
|
getDataTypeLvlList() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
type:"project_checking_data_type_lvl1"
|
type: "project_checking_data_type_lvl1"
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let list=[];
|
let list = [];
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it => {
|
||||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
list.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
dataTypeLvl1List:list,
|
dataTypeLvl1List: list,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
type:"project_checking_data_type_lvl2"
|
type: "project_checking_data_type_lvl2"
|
||||||
},
|
},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let tempData = []
|
let tempData = []
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it => {
|
||||||
console.log(that.data.dt1,"xxxxxxxxxxxxxxxx");
|
console.log(that.data.dt1, "xxxxxxxxxxxxxxxx");
|
||||||
if(it.remark==that.data.dt1){
|
if (it.remark == that.data.dt1) {
|
||||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
tempData.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
dataTypeLvl2List:tempData,
|
dataTypeLvl2List: tempData,
|
||||||
dataTypeLvl2AllList:res.data
|
dataTypeLvl2AllList: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -167,44 +195,47 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//切换验收结果
|
//切换验收结果
|
||||||
onSelectType(e){
|
onSelectType(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
checkingResult:e.detail.id
|
checkingResult: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//验收类型
|
//验收类型
|
||||||
onSelectTypeLvl1(e){
|
onSelectTypeLvl1(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
dataTypeLvl1:e.detail.id
|
dataTypeLvl1: e.detail.id
|
||||||
})
|
})
|
||||||
let tempData = []
|
let tempData = []
|
||||||
this.data.dataTypeLvl2AllList.forEach(it =>{
|
this.data.dataTypeLvl2AllList.forEach(it => {
|
||||||
if(it.remark==e.detail.id){
|
if (it.remark == e.detail.id) {
|
||||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
tempData.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
dataTypeLvl2List:tempData,
|
dataTypeLvl2List: tempData,
|
||||||
dataTypeLvl2:tempData[0].id,
|
dataTypeLvl2: tempData[0].id,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//类型分类
|
//类型分类
|
||||||
onSelectTypeLvl2(e){
|
onSelectTypeLvl2(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
dataTypeLvl2:e.detail.id
|
dataTypeLvl2: e.detail.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//工序部位
|
//工序部位
|
||||||
onInputCheckWorkingPositionValue(e){
|
onInputCheckWorkingPositionValue(e) {
|
||||||
let checkWorkingPosition = e.detail.value
|
let checkWorkingPosition = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
checkWorkingPosition
|
checkWorkingPosition
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//验收描述
|
//验收描述
|
||||||
onInputIntroValue(e){
|
onInputIntroValue(e) {
|
||||||
let intro = e.detail.value
|
let intro = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
intro
|
intro
|
||||||
|
|
@ -212,48 +243,64 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//验收时间
|
//验收时间
|
||||||
onInputTime(e){
|
onInputTime(e) {
|
||||||
let checkTime = e.detail
|
let checkTime = e.detail
|
||||||
this.setData({
|
this.setData({
|
||||||
checkTime
|
checkTime
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取安全检查详情信息
|
* 获取安全检查详情信息
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
getInfo(){
|
getInfo() {
|
||||||
let {id} = this.data
|
let {
|
||||||
|
id
|
||||||
|
} = this.data
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectchecking/info',
|
url: app.globalData.reqUrl + '/wechat/projectchecking/info',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
id:id
|
id: id
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let imageInfoData = [];
|
let imageInfoData = [];
|
||||||
if(res.data.imageUrls){
|
if (res.data.imageUrls) {
|
||||||
res.data.imageUrls.split(',').forEach(element => {
|
res.data.imageUrls.split(',').forEach(element => {
|
||||||
imageInfoData.push(that.data.request+element+'.min.jpg');
|
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({
|
that.setData({
|
||||||
infoData:res.data,
|
infoData: res.data,
|
||||||
dataTypeLvl1:res.data.dataTypeLvl1,
|
fileUrlArray: checkingFiles,
|
||||||
dataTypeLvl2:res.data.dataTypeLvl2,
|
dataTypeLvl1: res.data.dataTypeLvl1,
|
||||||
qualityUser:res.data.qualityUser,
|
dataTypeLvl2: res.data.dataTypeLvl2,
|
||||||
qualityUserName:res.data.qualityUserName,
|
qualityUser: res.data.qualityUser,
|
||||||
superviseUser:res.data.superviseUser,
|
qualityUserName: res.data.qualityUserName,
|
||||||
superviseUserName:res.data.superviseUserName,
|
superviseUser: res.data.superviseUser,
|
||||||
checkWorkingPosition:res.data.checkWorkingPosition,
|
superviseUserName: res.data.superviseUserName,
|
||||||
intro:res.data.intro,
|
checkWorkingPosition: res.data.checkWorkingPosition,
|
||||||
checkTime:res.data.checkTime,
|
intro: res.data.intro,
|
||||||
|
checkTime: res.data.checkTime,
|
||||||
imageInfoData,
|
imageInfoData,
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -263,20 +310,20 @@ Page({
|
||||||
/**
|
/**
|
||||||
* 查询流程日志
|
* 查询流程日志
|
||||||
*/
|
*/
|
||||||
getAuditinfo(){
|
getAuditinfo() {
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
fromType:"3",
|
fromType: "3",
|
||||||
fromId:this.data.id
|
fromId: this.data.id
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
that.setData({
|
that.setData({
|
||||||
flowRecordList:res.data
|
flowRecordList: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -291,124 +338,152 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
// list 上传图片
|
// list 上传图片
|
||||||
onImagesArr(e){
|
onImagesArr(e) {
|
||||||
var data = this.data.imageInfoData
|
var data = this.data.imageInfoData
|
||||||
data = e.detail
|
data = e.detail
|
||||||
this.setData({
|
this.setData({
|
||||||
imageInfoData:data
|
imageInfoData: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//添加质量专员
|
//添加质量专员
|
||||||
onAddQualityUser(e){
|
onAddQualityUser(e) {
|
||||||
if(e.detail.length>0){
|
if (e.detail.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
qualityUser:e.detail[0].phoneNumber,
|
qualityUser: e.detail[0].phoneNumber,
|
||||||
qualityUserName:e.detail[0].userName
|
qualityUserName: e.detail[0].userName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//添加监理专员
|
//添加监理专员
|
||||||
onAddSuperviseUser(e){
|
onAddSuperviseUser(e) {
|
||||||
if(e.detail.length>0){
|
if (e.detail.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
superviseUser:e.detail[0].phoneNumber,
|
superviseUser: e.detail[0].phoneNumber,
|
||||||
superviseUserName:e.detail[0].userName
|
superviseUserName: e.detail[0].userName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
//取消页面
|
||||||
cancelSaveView(){
|
cancelSaveView() {
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
//保存
|
||||||
onProblemSubmitSave(){
|
onProblemSubmitSave() {
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:true
|
loadShow: true
|
||||||
})
|
})
|
||||||
let that = this
|
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==""){
|
if (id == "") {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(imageInfoData.length==0){
|
if (imageInfoData.length == 0) {
|
||||||
app.toast("请上传举牌验收现场图片!")
|
app.toast("请上传举牌验收现场图片!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(dataTypeLvl1==""){
|
if (dataTypeLvl1 == "") {
|
||||||
app.toast("请选择验收类型!")
|
app.toast("请选择验收类型!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(dataTypeLvl2==""){
|
if (dataTypeLvl2 == "") {
|
||||||
app.toast("请选择类型分类!")
|
app.toast("请选择类型分类!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(qualityUser==""||qualityUserName==""){
|
if (qualityUser == "" || qualityUserName == "") {
|
||||||
app.toast("请选择质量专员!")
|
app.toast("请选择质量专员!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(superviseUser==""||superviseUserName==""){
|
if (superviseUser == "" || superviseUserName == "") {
|
||||||
app.toast("请选择监理专员!")
|
app.toast("请选择监理专员!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkWorkingPosition==""){
|
if (checkWorkingPosition == "") {
|
||||||
app.toast("请填写验收工序部位!")
|
app.toast("请填写验收工序部位!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(intro==""){
|
if (intro == "") {
|
||||||
app.toast("请填写验收结果描述!")
|
app.toast("请填写验收结果描述!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(checkTime==""){
|
if (checkTime == "") {
|
||||||
app.toast("请选择验收时间!")
|
app.toast("请选择验收时间!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
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 fileUrls = [];
|
||||||
imageInfoData.forEach(async (item)=>{
|
let _checkingFiles = [];
|
||||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
imageInfoData.forEach(async (item) => {
|
||||||
|
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||||
let name = "file"
|
let name = "file"
|
||||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||||
if(item.indexOf(that.data.request)>-1){
|
if (item.indexOf(that.data.request) > -1) {
|
||||||
fileUrls.push(item.replace(that.data.request,"").replace(".min.jpg",""));
|
fileUrls.push(item.replace(that.data.request, "").replace(".min.jpg", ""));
|
||||||
}else{
|
} else {
|
||||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||||
fileUrls.push(obj.data.fileName);
|
fileUrls.push(obj.data.fileName);
|
||||||
}
|
}
|
||||||
//验证图片上传完毕
|
//验证图片上传完毕
|
||||||
if(fileUrls.length == imageInfoData.length){
|
if (fileUrls.length == imageInfoData.length) {
|
||||||
let params = {
|
let params = {
|
||||||
id,
|
id,
|
||||||
qualityUser,
|
qualityUser,
|
||||||
|
|
@ -417,44 +492,68 @@ Page({
|
||||||
superviseUserName,
|
superviseUserName,
|
||||||
checkWorkingPosition,
|
checkWorkingPosition,
|
||||||
intro,
|
intro,
|
||||||
checkingDate:checkTime,
|
checkingDate: checkTime,
|
||||||
approveStatus:"1",
|
approveStatus: "1",
|
||||||
updateBy:loginName,
|
updateBy: loginName,
|
||||||
imageUrls:fileUrls.toString(),
|
imageUrls: fileUrls.toString(),
|
||||||
dataTypeLvl1,
|
dataTypeLvl1,
|
||||||
dataTypeLvl2,
|
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({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/projectchecking/edit',
|
url: app.globalData.reqUrl + '/wechat/projectchecking/edit',
|
||||||
method:"POST",
|
method: "POST",
|
||||||
data:params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"Username": loginName,
|
"Username": that.data.loginName,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
res =res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
app.toast("修改成功!")
|
app.toast("修改成功!")
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: '../list/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 这里考虑上传图片异步问题,封装为同步
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
*/
|
*/
|
||||||
syncUploadImage(url,uploadFile,name) {
|
syncUploadImage(url, uploadFile, name) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url, // 上传的服务器接口地址
|
url, // 上传的服务器接口地址
|
||||||
|
|
@ -463,7 +562,9 @@ Page({
|
||||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||||
},
|
},
|
||||||
name, //上传的所需字段,后端提供
|
name, //上传的所需字段,后端提供
|
||||||
formData: { user: 'test' },
|
formData: {
|
||||||
|
user: 'test'
|
||||||
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 上传完成操作
|
// 上传完成操作
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
|
|
@ -492,6 +593,17 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关附件上传
|
||||||
|
* @param {*} options
|
||||||
|
*/
|
||||||
|
otherFileUpload(options) {
|
||||||
|
let file = options.detail;
|
||||||
|
this.setData({
|
||||||
|
checkingFiles: file
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -95,7 +95,13 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">验收时间</view>
|
<view class="inspect_info_title">验收时间</view>
|
||||||
<view class="inspect_info_content">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ Page({
|
||||||
}, {
|
}, {
|
||||||
text: '结束'
|
text: '结束'
|
||||||
}],
|
}],
|
||||||
active: 100
|
active: 100,
|
||||||
|
checkingFiles:[]
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -78,16 +79,27 @@ Page({
|
||||||
})
|
})
|
||||||
let urls = [];
|
let urls = [];
|
||||||
let minUrls = [];
|
let minUrls = [];
|
||||||
|
let checkingFiles = [];
|
||||||
if (res.data.imageUrls) {
|
if (res.data.imageUrls) {
|
||||||
res.data.imageUrls.split(',').forEach(element => {
|
res.data.imageUrls.split(',').forEach(element => {
|
||||||
urls.push(that.data.request + element);
|
urls.push(that.data.request + element);
|
||||||
minUrls.push(that.data.request + element + '.min.jpg');
|
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({
|
that.setData({
|
||||||
infoData: res.data,
|
infoData: res.data,
|
||||||
imageList: urls,
|
imageList: urls,
|
||||||
minImageList: minUrls,
|
minImageList: minUrls,
|
||||||
|
checkingFiles,
|
||||||
loadShow: false
|
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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -116,13 +116,24 @@
|
||||||
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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}}">
|
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
||||||
<van-col span="18">
|
<van-col span="18">
|
||||||
<text 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==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: 5rpx 50rpx;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: 5rpx 50rpx;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-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/securityCheckGR/index.js
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -64,6 +66,11 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../pages/login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
if (options && options.barProId) {
|
if (options && options.barProId) {
|
||||||
//数据未加载完毕,从文件读取数据
|
//数据未加载完毕,从文件读取数据
|
||||||
if (app.globalData.projectInfoList.length == 0) {
|
if (app.globalData.projectInfoList.length == 0) {
|
||||||
|
|
@ -93,6 +100,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
|
myProjects.load();
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
//未获取用户信息时,重新登录
|
//未获取用户信息时,重新登录
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<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="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
<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 class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险合同
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险合同
|
||||||
<text style="font-size: small;">[仅可上传PDF格式]</text>
|
<text style="font-size: small;">[仅可上传PDF格式]</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_list_info_con">
|
<view class="inspect_info_content">
|
||||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr" data-index="{{0}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -65,13 +65,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">会签单图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArrSignFiles" data-index="{{1}}" limit="{{limit}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" wx:if="{{showBgd}}">
|
<view class="inspect_info_list" wx:if="{{showBgd}}">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">变更单图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArrAlterationFiles" data-index="{{2}}" limit="{{limit}}"></file-uploader>
|
||||||
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
|
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr" data-index="{{0}}" fileUrlArray="{{imageInfoData}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -94,13 +94,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">会签单图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArrSignFiles" data-index="{{1}}" limit="{{1}}" fileUrlArray="{{signFileData}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" wx:if="{{showBgd}}">
|
<view class="inspect_info_list" wx:if="{{showBgd}}">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">变更单图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArrAlterationFiles" data-index="{{2}}" limit="{{1}}" fileUrlArray="{{alterationFileData}}"></file-uploader>
|
||||||
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
|
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/securityCheckGR/index.js
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -49,6 +51,11 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../pages/login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
if (options && options.barProId) {
|
if (options && options.barProId) {
|
||||||
//数据未加载完毕,从文件读取数据
|
//数据未加载完毕,从文件读取数据
|
||||||
if (app.globalData.projectInfoList.length == 0) {
|
if (app.globalData.projectInfoList.length == 0) {
|
||||||
|
|
@ -78,12 +85,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
fail: err => {
|
myProjects.load();
|
||||||
//未获取用户信息时,重新登录
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../pages/login/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<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="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
<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 class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
|
||||||
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_list_info_con">
|
<view class="inspect_info_content">
|
||||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
|
||||||
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_list_info_con">
|
<view class="inspect_info_content">
|
||||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}" fileUrlArray="{{filesData}}"></file-uploader-all>
|
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}" fileUrlArray="{{filesData}}"></file-uploader-all>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/securityCheckGR/index.js
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -51,6 +53,11 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../pages/login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
if (options && options.barProId) {
|
if (options && options.barProId) {
|
||||||
//数据未加载完毕,从文件读取数据
|
//数据未加载完毕,从文件读取数据
|
||||||
if (app.globalData.projectInfoList.length == 0) {
|
if (app.globalData.projectInfoList.length == 0) {
|
||||||
|
|
@ -80,12 +87,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
fail: err => {
|
myProjects.load();
|
||||||
//未获取用户信息时,重新登录
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../pages/login/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<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="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
<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 class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// pageage/safetyManagement/securityCheckGR/index.js
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -64,6 +66,11 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../../pages/login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
if (options && options.barProId) {
|
if (options && options.barProId) {
|
||||||
//数据未加载完毕,从文件读取数据
|
//数据未加载完毕,从文件读取数据
|
||||||
if (app.globalData.projectInfoList.length == 0) {
|
if (app.globalData.projectInfoList.length == 0) {
|
||||||
|
|
@ -93,12 +100,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
fail: err => {
|
myProjects.load();
|
||||||
//未获取用户信息时,重新登录
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../pages/login/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<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="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='zg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>整改({{dzgCount}})</text></view>
|
<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>
|
<view class="{{activeState=='fj'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>复检({{dfjCount}})</text></view>
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{listData.length==0}}">
|
<view wx:if="{{listData.length==0}}">
|
||||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||||
<view style="color: #a5abbb;">暂无数据</view>
|
<view style="color: #a5abbb;">暂无数据</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
// pageage/safetyManagement/securityCheckGR/index.js
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
|
|
@ -57,6 +58,11 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../../pages/login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
if (options && options.barProId) {
|
if (options && options.barProId) {
|
||||||
//数据未加载完毕,从文件读取数据
|
//数据未加载完毕,从文件读取数据
|
||||||
if (app.globalData.projectInfoList.length == 0) {
|
if (app.globalData.projectInfoList.length == 0) {
|
||||||
|
|
@ -86,12 +92,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
fail: err => {
|
myProjects.load();
|
||||||
//未获取用户信息时,重新登录
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../pages/login/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<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="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='zg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>整改({{dzgCount}})</text></view>
|
<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>
|
<view class="{{activeState=='fj'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>复检({{dfjCount}})</text></view>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{listData.length==0}}">
|
<view wx:if="{{listData.length==0}}">
|
||||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||||
<view style="color: #a5abbb;">暂无数据</view>
|
<view style="color: #a5abbb;">暂无数据</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">形象进度图片</view>
|
<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 bindimages="onImagesArr" fileUrlArray="{{uploadImages}}"
|
||||||
></file-uploader>
|
></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">证书附件
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">证书附件
|
||||||
<text style="font-size: small;">[可上传PDF和图片格式]</text>
|
<text style="font-size: small;">[可上传PDF和图片格式]</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_list_info_con">
|
<view class="inspect_info_content">
|
||||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// pageage/safetyManagement/addSafetyInspect/index.js
|
import jsonConfig from '../../../utils/json'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -6,58 +6,119 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
deptId:"",
|
deptId: "",
|
||||||
projectId:"",
|
projectId: "",
|
||||||
projectName:"",
|
projectName: "",
|
||||||
loginName:"",
|
loginName: "",
|
||||||
imageInfoData:[],
|
imageInfoData: [],
|
||||||
loadShow:false,
|
loadShow: false,
|
||||||
standardType:"1",
|
standardType: "1",
|
||||||
standardTypeList:[],
|
standardTypeList: [],
|
||||||
info:"",
|
info: "",
|
||||||
standardDesc:""
|
standardDesc: "",
|
||||||
|
standardNotes:[],
|
||||||
|
showPopup:false,
|
||||||
|
showDetailsName:"",
|
||||||
|
activeId:null,
|
||||||
|
mainActiveIndex:0,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let {projectId,projectName} = options
|
let {
|
||||||
|
projectId,
|
||||||
|
projectName
|
||||||
|
} = options
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
projectId,
|
projectId,
|
||||||
projectName,
|
projectName,
|
||||||
deptId:res.data.deptId,
|
deptId: res.data.deptId,
|
||||||
loginName:res.data.loginName
|
loginName: res.data.loginName
|
||||||
})
|
})
|
||||||
this.getStandardTypeList();
|
this.getStandardTypeList();
|
||||||
|
this.initStandardTypeListNotes(this.data.standardType);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getStandardTypeList(){
|
/**
|
||||||
|
* 初始化标准类型
|
||||||
|
*/
|
||||||
|
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
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectStandard/queryStandardType',
|
url: app.globalData.reqUrl + '/wechat/projectStandard/queryStandardType',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{},
|
data: {},
|
||||||
header:{
|
header: {
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let list=[];
|
let list = [];
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it => {
|
||||||
list.push({"id":it.dictValue,"text":it.dictLabel,"info":it.remark});
|
list.push({
|
||||||
|
"id": it.dictValue,
|
||||||
|
"text": it.dictLabel,
|
||||||
|
"info": it.remark
|
||||||
|
});
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
standardTypeList:list,
|
standardTypeList: list,
|
||||||
standardType:res.data[0].dictValue,
|
standardType: res.data[0].dictValue,
|
||||||
info:res.data[0].remark
|
info: res.data[0].remark
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +126,7 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//图片描述
|
//图片描述
|
||||||
onInputStandardDesc(e){
|
onInputStandardDesc(e) {
|
||||||
let standardDesc = e.detail.value
|
let standardDesc = e.detail.value
|
||||||
this.setData({
|
this.setData({
|
||||||
standardDesc
|
standardDesc
|
||||||
|
|
@ -73,93 +134,108 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
// list 上传图片
|
// list 上传图片
|
||||||
onImagesArr(e){
|
onImagesArr(e) {
|
||||||
var data = this.data.imageInfoData
|
var data = this.data.imageInfoData
|
||||||
data = e.detail
|
data = e.detail
|
||||||
this.setData({
|
this.setData({
|
||||||
imageInfoData:data
|
imageInfoData: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
//取消页面
|
||||||
cancelSaveView(){
|
cancelSaveView() {
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
//保存
|
||||||
onSave(){
|
onSave() {
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:true
|
loadShow: true
|
||||||
})
|
})
|
||||||
let that = this
|
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==""){
|
if (projectId == "" || loginName == "" || deptId == "") {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(imageInfoData.length==0){
|
if (standardType == "") {
|
||||||
app.toast("请上传标准图片!")
|
|
||||||
that.setData({
|
|
||||||
loadShow:false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(standardType==""){
|
|
||||||
app.toast("请选择标准类型!")
|
app.toast("请选择标准类型!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(standardDesc==""){
|
if(!activeId){
|
||||||
|
app.toast("请选择类型明细!")
|
||||||
|
that.setData({
|
||||||
|
loadShow: false
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (imageInfoData.length == 0) {
|
||||||
|
app.toast("请上传标准图片!")
|
||||||
|
that.setData({
|
||||||
|
loadShow: false
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (standardDesc == "") {
|
||||||
app.toast("请填写图片描述!")
|
app.toast("请填写图片描述!")
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let fileUrls = [];
|
let fileUrls = [];
|
||||||
imageInfoData.forEach(async (item)=>{
|
imageInfoData.forEach(async (item) => {
|
||||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||||
let name = "file"
|
let name = "file"
|
||||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||||
fileUrls.push(obj.data.fileName);
|
fileUrls.push(obj.data.fileName);
|
||||||
//验证图片上传完毕
|
//验证图片上传完毕
|
||||||
if(fileUrls.length == imageInfoData.length){
|
if (fileUrls.length == imageInfoData.length) {
|
||||||
let params = {
|
let params = {
|
||||||
projectId,
|
projectId,
|
||||||
deptId,
|
deptId,
|
||||||
imageFile:fileUrls.toString(),
|
imageFile: fileUrls.toString(),
|
||||||
standardType,
|
standardType:activeId,
|
||||||
standardDesc,
|
standardDesc,
|
||||||
ord:1,
|
ord: 1,
|
||||||
createBy:loginName
|
createBy: loginName
|
||||||
}
|
}
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/projectStandard/add',
|
url: app.globalData.reqUrl + '/wechat/projectStandard/add',
|
||||||
method:"POST",
|
method: "POST",
|
||||||
data:params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"Username": loginName,
|
"Username": loginName,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
app.toast("添加成功!")
|
app.toast("添加成功!")
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: '../list/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -170,7 +246,7 @@ Page({
|
||||||
/**
|
/**
|
||||||
* 这里考虑上传图片异步问题,封装为同步
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
*/
|
*/
|
||||||
syncUploadImage(url,uploadFile,name) {
|
syncUploadImage(url, uploadFile, name) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url, // 上传的服务器接口地址
|
url, // 上传的服务器接口地址
|
||||||
|
|
@ -179,7 +255,9 @@ Page({
|
||||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||||
},
|
},
|
||||||
name, //上传的所需字段,后端提供
|
name, //上传的所需字段,后端提供
|
||||||
formData: { user: 'test' },
|
formData: {
|
||||||
|
user: 'test'
|
||||||
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 上传完成操作
|
// 上传完成操作
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
|
|
@ -201,12 +279,13 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//选择测量类型
|
//选择项目标准类型
|
||||||
onSelectStandardType(e){
|
onSelectStandardType(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
standardType:e.detail.id,
|
standardType: e.detail.id,
|
||||||
info:e.detail.info
|
info: e.detail.info
|
||||||
})
|
})
|
||||||
|
this.initStandardTypeListNotes(e.detail.id);
|
||||||
},
|
},
|
||||||
|
|
||||||
returnToPage: function () {
|
returnToPage: function () {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"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"
|
"navigationStyle":"custom"
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="4">
|
<van-col span="4">
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage">
|
||||||
|
<image src="/images/left.png"></image>
|
||||||
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="15">
|
<van-col span="15">
|
||||||
<view class="header_name">新增项目标准</view>
|
<view class="header_name">新增项目标准</view>
|
||||||
|
|
@ -25,24 +27,33 @@
|
||||||
<text class="color_blue">{{info}}</text>
|
<text class="color_blue">{{info}}</text>
|
||||||
</view>
|
</view>
|
||||||
</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_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">标准图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr" limit="{{1}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">图片描述</view>
|
<view class="inspect_info_title">图片描述</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<textarea class="add_textarea" placeholder="请填写图片描述"
|
<textarea class="add_textarea" placeholder="请填写图片描述" placeholder-style="color:#6777aa;" bindinput="onInputStandardDesc" maxlength="200" />
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputStandardDesc" maxlength="200"/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_submit_to">
|
<view class="problem_submit_to">
|
||||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">提交</view>
|
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">提交</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-overlay show="{{loadShow}}">
|
<van-overlay show="{{loadShow}}">
|
||||||
|
|
@ -51,51 +62,3 @@
|
||||||
<view>数据加载中!请稍后...</view>
|
<view>数据加载中!请稍后...</view>
|
||||||
</view>
|
</view>
|
||||||
</van-overlay>
|
</van-overlay>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,99 @@
|
||||||
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
|
||||||
.van-popup{
|
.van-popup{
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
.van-image__img{
|
.van-image__img{
|
||||||
border-radius: 10rpx !important;
|
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;
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
// pageage/project_checking/info/index.js
|
import jsonConfig from '../../../utils/json'
|
||||||
|
import {
|
||||||
|
getDictCache
|
||||||
|
} from '../../../api/publics'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -6,71 +9,119 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
id:"",
|
id: "",
|
||||||
infoData:{},
|
type: "",
|
||||||
loadShow:false,
|
infoData: {},
|
||||||
loginName:"",
|
loadShow: false,
|
||||||
projectName:"",
|
loginName: "",
|
||||||
showDel:false,
|
projectName: "",
|
||||||
imageList:[],
|
showDel: false,
|
||||||
minImageList:[],
|
imageList: [],
|
||||||
request:app.globalData.reqUrl
|
minImageList: [],
|
||||||
|
request: app.globalData.reqUrl,
|
||||||
|
standardTypeName: "",
|
||||||
|
standardTypeRemark: "",
|
||||||
|
standardNotesName: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
let {id} = options
|
let {
|
||||||
|
id,
|
||||||
|
standardType
|
||||||
|
} = options
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
id,
|
id,
|
||||||
loginName:res.data.loginName,
|
type: standardType.substring(0, 1),
|
||||||
projectName:app.globalData.projectName
|
loginName: res.data.loginName,
|
||||||
|
projectName: app.globalData.projectName
|
||||||
})
|
})
|
||||||
|
this.getDicts();
|
||||||
this.getInfo();
|
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(){
|
getInfo() {
|
||||||
let {id} = this.data
|
let {
|
||||||
|
id
|
||||||
|
} = this.data
|
||||||
let that = this
|
let that = this
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectStandard/info',
|
url: app.globalData.reqUrl + '/wechat/projectStandard/info',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
id:id
|
id: id
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let urls = [];
|
let urls = [];
|
||||||
let minUrls = [];
|
let minUrls = [];
|
||||||
if(res.data.imageFile){
|
if (res.data.imageFile) {
|
||||||
res.data.imageFile.split(',').forEach(element => {
|
res.data.imageFile.split(',').forEach(element => {
|
||||||
urls.push(that.data.request+element);
|
urls.push(that.data.request + element);
|
||||||
minUrls.push(that.data.request+element+'.min.jpg');
|
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({
|
that.setData({
|
||||||
infoData:res.data,
|
infoData: res.data,
|
||||||
imageList:urls,
|
imageList: urls,
|
||||||
minImageList:minUrls,
|
minImageList: minUrls,
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
//判断当前能否删除
|
//判断当前能否删除
|
||||||
if(res.data.createBy!=that.data.loginName){
|
if (res.data.createBy == that.data.loginName) {
|
||||||
that.setData({
|
that.setData({
|
||||||
showDel:true
|
showDel: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -78,7 +129,7 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onDelete(){
|
onDelete() {
|
||||||
//弹出确认
|
//弹出确认
|
||||||
let that = this
|
let that = this
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
|
|
@ -94,19 +145,21 @@ Page({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deleteData(){
|
deleteData() {
|
||||||
let {id} = this.data
|
let {
|
||||||
|
id
|
||||||
|
} = this.data
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl+'/wechat/projectStandard/remove',
|
url: app.globalData.reqUrl + '/wechat/projectStandard/remove',
|
||||||
header: {
|
header: {
|
||||||
"Username": that.data.loginName,
|
"Username": that.data.loginName,
|
||||||
},
|
},
|
||||||
data:{
|
data: {
|
||||||
id:id
|
id: id
|
||||||
},
|
},
|
||||||
method:"get",
|
method: "get",
|
||||||
success(res){
|
success(res) {
|
||||||
app.toast("删除成功!")
|
app.toast("删除成功!")
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../list/index`,
|
url: `../list/index`,
|
||||||
|
|
@ -116,8 +169,8 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//展示图片
|
//展示图片
|
||||||
showImg:function(e){
|
showImg: function (e) {
|
||||||
var that=this;
|
var that = this;
|
||||||
wx.previewImage({
|
wx.previewImage({
|
||||||
urls: that.data.imageList,
|
urls: that.data.imageList,
|
||||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,16 @@
|
||||||
<view class="inspect_overview_list">
|
<view class="inspect_overview_list">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">标准类型</text></van-col>
|
<van-col span="6"><text class="color_purple">标准类型</text></van-col>
|
||||||
<van-col span="18" 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>
|
</van-row>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_overview_list color_blue">{{infoData.standardTypeRemark}}</view>
|
|
||||||
<view class="inspect_overview_list">
|
<view class="inspect_overview_list">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">标准图片</text></van-col>
|
<van-col span="6"><text class="color_purple">标准图片</text></van-col>
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,10 @@ Page({
|
||||||
|
|
||||||
getInfo(e) {
|
getInfo(e) {
|
||||||
let {
|
let {
|
||||||
id
|
id,standardType
|
||||||
} = e.currentTarget.dataset.set
|
} = e.currentTarget.dataset.set
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../info/index?id=${id}`
|
url: `../info/index?id=${id}&standardType=${standardType}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -79,7 +79,11 @@ Page({
|
||||||
standard = options.standard;
|
standard = options.standard;
|
||||||
app.globalData.standard = options.standard;
|
app.globalData.standard = options.standard;
|
||||||
} else {
|
} else {
|
||||||
|
if(app.globalData.standard){
|
||||||
standard = app.globalData.standard;
|
standard = app.globalData.standard;
|
||||||
|
}else{
|
||||||
|
standard = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">{{minTitle}}图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr" limit="{{limit}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">相关文件
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">相关文件
|
||||||
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_list_info_con">
|
<view class="inspect_info_content">
|
||||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
<view class="max_tab_name">
|
<view class="max_tab_name">
|
||||||
<view class="option_list_title">
|
<view class="option_list_title">
|
||||||
<view class="option_list_title_btn" bindtap="onCloseDept">取消</view>
|
<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 class="option_list_title_btn" bindtap="onCloseDept">确认</view>
|
||||||
</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 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>
|
||||||
|
|
|
||||||
|
|
@ -36,20 +36,20 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 30rpx 0 20rpx;">存在问题</view>
|
<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"
|
<input placeholder="请填写" placeholder-style="color:#6777aa;" class="inspect_input_fill_in"
|
||||||
value="{{item.existing_problems}}" bindinput="onPositionInput" data-index="{{index}}"/>
|
value="{{item.existing_problems}}" bindinput="onPositionInput" data-index="{{index}}"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">检查图片</view>
|
<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>
|
<file-uploader bindimages="onImagesArr" data-index="{{index}}" fileUrlArray="{{item.image_upload}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 30rpx 0 20rpx;">整改责任人</view>
|
<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>
|
<select-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddResponsible" data-index="{{index}}" choose="{{item.person_responsible}}"></select-person>
|
||||||
<!-- <view class="nspect_info_rectifier">
|
<!-- <view class="nspect_info_rectifier">
|
||||||
<van-row>
|
<van-row>
|
||||||
|
|
|
||||||
|
|
@ -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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationStyle":"custom"
|
||||||
|
}
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
height:180rpx;
|
height:180rpx;
|
||||||
border: 1px dashed #28345a;
|
border: 1px dashed #28345a;
|
||||||
border-radius: 10rpx;
|
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{
|
.in-img-div image{
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
height:180rpx;
|
height:180rpx;
|
||||||
border: 1px dashed #28345a;
|
border: 1px dashed #28345a;
|
||||||
border-radius: 10rpx;
|
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{
|
.in-img-div image{
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
|
|
|
||||||
|
|
@ -129,5 +129,13 @@ Component({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 重新加载项目列表
|
||||||
|
*/
|
||||||
|
load:function(){
|
||||||
|
this.setData({
|
||||||
|
projectList: app.globalData.projectInfoList,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
|
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
|
||||||
<view class="option_list_title">
|
<view class="option_list_title">
|
||||||
<view class="option_list_title_btn" bindtap="onClose">取消</view>
|
<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 class="option_list_title_btn" bindtap="onConfirm">确认</view>
|
||||||
</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" />
|
<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" />
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import {
|
||||||
} from '../../../utils/auth'
|
} from '../../../utils/auth'
|
||||||
import {
|
import {
|
||||||
loginOut,
|
loginOut,
|
||||||
|
updatePwd,
|
||||||
findOpenUserMsgId
|
findOpenUserMsgId
|
||||||
} from '../../../api/login'
|
} from '../../../api/login'
|
||||||
|
|
||||||
|
|
@ -190,33 +191,26 @@ Component({
|
||||||
app.toast("请输入确认密码长度 [6-20]位字符!");
|
app.toast("请输入确认密码长度 [6-20]位字符!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wx.request({
|
let data = {
|
||||||
header: {
|
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
|
||||||
},
|
|
||||||
url: app.globalData.reqUrl + '/wechat/updatePassword',
|
|
||||||
data: {
|
|
||||||
loginName: that.data.loginName,
|
loginName: that.data.loginName,
|
||||||
oldPsw: that.data.oldPsw,
|
oldPass: that.data.oldPsw,
|
||||||
newPsw: that.data.newPsw,
|
password: that.data.newPsw,
|
||||||
password: that.data.password
|
confPass: that.data.password,
|
||||||
},
|
source:"u"
|
||||||
method: "POST",
|
}
|
||||||
success: function (res) {
|
updatePwd(data).then(res =>{
|
||||||
if (res.data && res.data.data == "200") {
|
if(res.code==200){
|
||||||
|
app.toast("密码修改成功,请重新登录!",800);
|
||||||
removeToken();
|
removeToken();
|
||||||
wx.clearStorageSync();
|
wx.clearStorageSync();
|
||||||
wx.setStorageSync('isReload', "1");
|
wx.setStorageSync('isReload', "1");
|
||||||
app.toast("密码修改成功!");
|
setTimeout(()=>{
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../login/index',
|
url: '../login/index',
|
||||||
});
|
});
|
||||||
} else {
|
},500)
|
||||||
app.toast(res.data.info);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
})
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -41,7 +41,6 @@ Component({
|
||||||
* 组件的初始数据
|
* 组件的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
|
||||||
show: false,
|
show: false,
|
||||||
forData:[],
|
forData:[],
|
||||||
echoData:[],
|
echoData:[],
|
||||||
|
|
@ -60,7 +59,7 @@ Component({
|
||||||
onSelectChange(e){
|
onSelectChange(e){
|
||||||
var data = this.data.forData
|
var data = this.data.forData
|
||||||
var index = e.currentTarget.dataset.index
|
var index = e.currentTarget.dataset.index
|
||||||
if(data[index].type == false){
|
if(data[index].type === undefined || data[index].type == false){
|
||||||
data[index].type = true
|
data[index].type = true
|
||||||
}else{
|
}else{
|
||||||
data[index].type = false
|
data[index].type = false
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
|
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
|
||||||
<view class="option_list_title">
|
<view class="option_list_title">
|
||||||
<view class="option_list_title_btn" bindtap="onClose">取消</view>
|
<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 class="option_list_title_btn" bindtap="onConfirm">确认</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="option_list_max">
|
<view class="option_list_max">
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
}
|
}
|
||||||
.option_list_list.active{
|
.option_list_list.active{
|
||||||
color: #ffffff;
|
color: #06d4f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,7 @@ Page({
|
||||||
let projectName = e.detail.text;
|
let projectName = e.detail.text;
|
||||||
app.globalData.projectId = projectId;
|
app.globalData.projectId = projectId;
|
||||||
app.globalData.projectName = projectName;
|
app.globalData.projectName = projectName;
|
||||||
this.setData({
|
this.onLoad();
|
||||||
projectId:projectId,
|
|
||||||
projectName:projectName
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -476,14 +476,14 @@ Page({
|
||||||
if(that.data.userInfo.minRoleId<4){
|
if(that.data.userInfo.minRoleId<4){
|
||||||
if(deptId=="0"){
|
if(deptId=="0"){
|
||||||
//存入文件中
|
//存入文件中
|
||||||
wx.setStorageSync({
|
wx.setStorage({
|
||||||
key: 'projectInfoList',
|
key: 'projectInfoList',
|
||||||
data: res.data
|
data: res.data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//存入文件中
|
//存入文件中
|
||||||
wx.setStorageSync({
|
wx.setStorage({
|
||||||
key: 'projectInfoList',
|
key: 'projectInfoList',
|
||||||
data: res.data
|
data: res.data
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,15 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 忘记密码
|
||||||
|
*/
|
||||||
|
updatePs(){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../alter-ps/index',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
//获取填写的密码信息
|
//获取填写的密码信息
|
||||||
code: function (even) {
|
code: function (even) {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|
@ -117,7 +126,7 @@ Page({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
data: res.data.data.userinfo
|
data: res.data.data.userinfo
|
||||||
});
|
});
|
||||||
if(res.data.token){
|
if (res.data.token) {
|
||||||
//更新token信息
|
//更新token信息
|
||||||
setToken(res.data.token);
|
setToken(res.data.token);
|
||||||
}
|
}
|
||||||
|
|
@ -153,6 +162,7 @@ Page({
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
that.onClickHide();
|
that.onClickHide();
|
||||||
|
app.toast(res.data.msg, 2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -180,11 +190,11 @@ Page({
|
||||||
var password = that.data.password;
|
var password = that.data.password;
|
||||||
var usercode = this.data.usercode;
|
var usercode = this.data.usercode;
|
||||||
if (username == "") {
|
if (username == "") {
|
||||||
app.toast("账号不能为空");
|
app.toast("登录账号不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (password == "") {
|
if (password == "") {
|
||||||
app.toast("密码不能为空");
|
app.toast("登录密码不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (usercode == "") {
|
if (usercode == "") {
|
||||||
|
|
@ -199,31 +209,23 @@ Page({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//启动蒙版
|
let params = {
|
||||||
that.onClickShow();
|
|
||||||
//发送请求
|
|
||||||
wx.request({
|
|
||||||
url: app.globalData.reqUrl + '/wechat/login',
|
|
||||||
data: {
|
|
||||||
"username": username,
|
"username": username,
|
||||||
"password": password,
|
"password": password,
|
||||||
"openId": openId,
|
"openId": openId,
|
||||||
"code": usercode,
|
"code": usercode,
|
||||||
"uuid": this.data.uuid,
|
"uuid": this.data.uuid,
|
||||||
},
|
};
|
||||||
method: "POST",
|
login(params).then(res => {
|
||||||
success(res) {
|
if (res.code == 200) {
|
||||||
//关闭蒙版
|
|
||||||
that.onClickHide();
|
|
||||||
if (res.data.code == '200') {
|
|
||||||
//把数据存到缓存中
|
//把数据存到缓存中
|
||||||
wx.setStorage({
|
wx.setStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
data: res.data.data.userinfo
|
data: res.data.userinfo
|
||||||
});
|
});
|
||||||
setToken(res.data.token);
|
setToken(res.token);
|
||||||
let rd = res.data.data;
|
|
||||||
wx.setStorageSync('isReload', "");
|
wx.setStorageSync('isReload', "");
|
||||||
|
let rd = res.data;
|
||||||
//只有一个项目时直接跳转详情页
|
//只有一个项目时直接跳转详情页
|
||||||
if (rd.projectInfo != null || rd.projectInfo != undefined) {
|
if (rd.projectInfo != null || rd.projectInfo != undefined) {
|
||||||
//赋值到公共参数
|
//赋值到公共参数
|
||||||
|
|
@ -248,12 +250,9 @@ Page({
|
||||||
url: '../map/map',
|
url: '../map/map',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
}else{
|
||||||
that.loadCodeImage();
|
that.loadCodeImage();
|
||||||
app.toast(res.data.msg,1000);
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
@ -25,12 +25,23 @@
|
||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</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>
|
||||||
|
|
||||||
<view class="login_btn" bindtap="userLogin">
|
<view class="login_btn" bindtap="userLogin">
|
||||||
确 定
|
确 定
|
||||||
</view>
|
</view>
|
||||||
|
<view class="pc">电脑端登陆 https://szgc.jhncidg.com</view>
|
||||||
<van-overlay show="{{show}}">
|
<van-overlay show="{{show}}">
|
||||||
<view class="gif">
|
<view class="gif">
|
||||||
<image src="../../images/loding2.gif"></image>
|
<image src="../../images/loding2.gif"></image>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
/* pages/login/index.wxss */
|
/* pages/login/index.wxss */
|
||||||
page{
|
page {
|
||||||
background: #191d28 url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
|
background: #191d28 url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
|
||||||
}
|
}
|
||||||
.login_title{
|
|
||||||
|
.login_title {
|
||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
line-height: 180rpx;
|
line-height: 180rpx;
|
||||||
color: #DDDDDD;
|
color: #DDDDDD;
|
||||||
|
|
@ -11,55 +12,64 @@ page{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: url("https://szgcwx.jhncidg.com/staticFiles/img/yanzhu_title.png") no-repeat left/100% 100%;
|
background: url("https://szgcwx.jhncidg.com/staticFiles/img/yanzhu_title.png") no-repeat left/100% 100%;
|
||||||
}
|
}
|
||||||
.login_title text{
|
|
||||||
|
.login_title text {
|
||||||
border-bottom: 3px solid #728ce3;
|
border-bottom: 3px solid #728ce3;
|
||||||
}
|
}
|
||||||
.login_bg{
|
|
||||||
|
.login_bg {
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
margin: 0 40rpx;
|
margin: 0 40rpx;
|
||||||
padding: 25rpx 40rpx;
|
padding: 25rpx 40rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
.login_dl{
|
|
||||||
|
.login_dl {
|
||||||
color: #728ce3;
|
color: #728ce3;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.login_ex{
|
|
||||||
padding:20rpx 0;
|
.login_ex {
|
||||||
|
padding: 20rpx 0;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
border-bottom: 20rpx dashed #728ce3;
|
border-bottom: 20rpx dashed #728ce3;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
.login_input{
|
|
||||||
|
.login_input {
|
||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
}
|
}
|
||||||
.login_input .name{
|
|
||||||
|
.login_input .name {
|
||||||
background: url("https://szgcwx.jhncidg.com/staticFiles/img/login_name.png") no-repeat left/40rpx;
|
background: url("https://szgcwx.jhncidg.com/staticFiles/img/login_name.png") no-repeat left/40rpx;
|
||||||
border-bottom: 1px solid #5e6ea2;
|
border-bottom: 1px solid #5e6ea2;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
width: 93%;
|
width: 85%;
|
||||||
color: #728ce3;
|
color: #728ce3;
|
||||||
padding: 0 50rpx;
|
padding: 0 50rpx;
|
||||||
}
|
}
|
||||||
.login_btn{
|
|
||||||
margin:80rpx;
|
.login_btn {
|
||||||
|
margin: 20rpx 60rpx 60rpx 60rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
background-image: linear-gradient(#5b9fff, #7655fc);
|
background-image: linear-gradient(#5b9fff, #7655fc);
|
||||||
border-radius: 80rpx;
|
border-radius: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
margin-bottom: 150rpx;
|
|
||||||
}
|
}
|
||||||
.login_btn:active{
|
|
||||||
margin:82rpx 55rpx 0;
|
.login_btn:active {
|
||||||
|
background-image: linear-gradient(#7655fc, #5b9fff);
|
||||||
}
|
}
|
||||||
.login_logo{
|
|
||||||
|
.login_logo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height:100rpx;
|
height: 100rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.login_logo image{
|
|
||||||
|
.login_logo image {
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
@ -82,15 +92,24 @@ page{
|
||||||
padding: 0 50rpx;
|
padding: 0 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login_code image{
|
.login_code image {
|
||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lv {
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
color: #728ce3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lv-r {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc {
|
||||||
|
text-align: center;
|
||||||
|
color: #5e6ea2;
|
||||||
|
}
|
||||||
|
|
@ -697,14 +697,14 @@ Page({
|
||||||
if(that.data.userInfo.minRoleId<4){
|
if(that.data.userInfo.minRoleId<4){
|
||||||
if(deptId=="0"){
|
if(deptId=="0"){
|
||||||
//存入文件中
|
//存入文件中
|
||||||
wx.setStorageSync({
|
wx.setStorage({
|
||||||
key: 'projectInfoList',
|
key: 'projectInfoList',
|
||||||
data: res.data
|
data: res.data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//存入文件中
|
//存入文件中
|
||||||
wx.setStorageSync({
|
wx.setStorage({
|
||||||
key: 'projectInfoList',
|
key: 'projectInfoList',
|
||||||
data: res.data
|
data: res.data
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@ Page({
|
||||||
result:"1",
|
result:"1",
|
||||||
comment:"",
|
comment:"",
|
||||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
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({
|
that.setData({
|
||||||
infoData:res.data,
|
infoData:res.data,
|
||||||
|
attachments,
|
||||||
detectionImageList:imageUrls,
|
detectionImageList:imageUrls,
|
||||||
minDetectionFileImages:minImageUrls,
|
minDetectionFileImages:minImageUrls,
|
||||||
detectionFiles:fileNames,
|
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 () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
|
|
@ -99,6 +99,27 @@
|
||||||
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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">
|
<view class="inspect_overview_list">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ Page({
|
||||||
result:"1",
|
result:"1",
|
||||||
comment:"",
|
comment:"",
|
||||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||||
active: 2
|
active: 2,
|
||||||
|
checkingFiles:[]
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -58,16 +59,27 @@ Page({
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
let urls = [];
|
let urls = [];
|
||||||
let minUrls = [];
|
let minUrls = [];
|
||||||
|
let checkingFiles=[];
|
||||||
if(res.data.imageUrls){
|
if(res.data.imageUrls){
|
||||||
res.data.imageUrls.split(',').forEach(element => {
|
res.data.imageUrls.split(',').forEach(element => {
|
||||||
urls.push(that.data.request+element);
|
urls.push(that.data.request+element);
|
||||||
minUrls.push(that.data.request+element+'.min.jpg');
|
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({
|
that.setData({
|
||||||
infoData:res.data,
|
infoData:res.data,
|
||||||
imageList:urls,
|
imageList:urls,
|
||||||
minImageList:minUrls,
|
minImageList:minUrls,
|
||||||
|
checkingFiles,
|
||||||
loadShow:false
|
loadShow:false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="4">
|
<van-col span="4">
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage">
|
||||||
|
<image src="/images/left.png"></image>
|
||||||
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="15">
|
<van-col span="15">
|
||||||
<view class="header_name">举牌验收审批</view>
|
<view class="header_name">举牌验收审批</view>
|
||||||
|
|
@ -33,10 +35,18 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_list_info gk_open_con">
|
<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.userName}}">
|
||||||
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view>
|
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
|
||||||
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view>
|
</view>
|
||||||
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view>
|
<view wx:if="{{item.deptName}}">
|
||||||
|
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
|
||||||
|
</view>
|
||||||
|
<view wx:if="{{item.comment}}">
|
||||||
|
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -106,6 +116,17 @@
|
||||||
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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}}">
|
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
||||||
|
|
@ -139,14 +160,13 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">审批结果</view>
|
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">审批结果</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{list}}" placeholder="请选择审批结果" bindchange="onSelect" ></voucher-select>
|
<voucher-select columns="{{list}}" placeholder="请选择审批结果" bindchange="onSelect"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title">审批意见</view>
|
<view class="inspect_info_title">审批意见</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<textarea class="add_textarea" placeholder="请填写审批意见(200字内)"
|
<textarea class="add_textarea" placeholder="请填写审批意见(200字内)" placeholder-style="color:#6777aa;" bindinput="onInputValue" maxlength="200" />
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputValue" maxlength="200"/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_submit_to">
|
<view class="problem_submit_to">
|
||||||
|
|
@ -154,7 +174,7 @@
|
||||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交审批</view>
|
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交审批</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<van-overlay show="{{loadShow}}">
|
<van-overlay show="{{loadShow}}">
|
||||||
<view class="gif">
|
<view class="gif">
|
||||||
|
|
@ -162,4 +182,3 @@
|
||||||
<view>数据加载中!请稍后...</view>
|
<view>数据加载中!请稍后...</view>
|
||||||
</view>
|
</view>
|
||||||
</van-overlay>
|
</van-overlay>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
|
import {
|
||||||
|
getDictCache
|
||||||
|
} from '../../../api/publics'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -34,14 +37,19 @@ Page({
|
||||||
imageType:["png","jpg","jpeg"],
|
imageType:["png","jpg","jpeg"],
|
||||||
fileType:["pdf"],
|
fileType:["pdf"],
|
||||||
active: 100,
|
active: 100,
|
||||||
rejectNode:false
|
rejectNode:false,
|
||||||
|
subDeptTypes: [],
|
||||||
|
subDeptScopes: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
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({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
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){
|
getFlowNode(val){
|
||||||
let flowNodeList = this.data.flowNodeList;
|
let flowNodeList = this.data.flowNodeList;
|
||||||
for(let i=0;i<flowNodeList.length;i++){
|
for(let i=0;i<flowNodeList.length;i++){
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
|
|
@ -90,6 +90,71 @@
|
||||||
<van-col span="18">{{procDefName}}</van-col>
|
<van-col span="18">{{procDefName}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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%;">
|
<view class="inspect_overview_list" style="width: 100%;">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">审批内容</text></van-col>
|
<van-col span="6"><text class="color_purple">审批内容</text></van-col>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,15 @@
|
||||||
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
||||||
.problem_list_info_con{
|
.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{
|
.in-img-max:after{
|
||||||
display:block;
|
display:block;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
import { queryTaskCountByCategory } from '../../../api/flowable'
|
import { queryTaskCountByCategory } from '../../../api/flowable'
|
||||||
|
import {
|
||||||
|
getToken
|
||||||
|
} from '../../../utils/auth'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -61,6 +64,11 @@ Page({
|
||||||
name: '专项验收审批',
|
name: '专项验收审批',
|
||||||
icon: config.baseUrl + '/staticFiles/img/zxyssp.png',
|
icon: config.baseUrl + '/staticFiles/img/zxyssp.png',
|
||||||
todoDB:0,
|
todoDB:0,
|
||||||
|
}, {
|
||||||
|
id: 9,
|
||||||
|
name: '分包资质审批',
|
||||||
|
icon: config.baseUrl + '/staticFiles/img/tzl.png',
|
||||||
|
todoDB:0,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -75,27 +83,28 @@ Page({
|
||||||
startDeptName,
|
startDeptName,
|
||||||
startUserName,
|
startUserName,
|
||||||
procDefName,
|
procDefName,
|
||||||
businessKeyName
|
businessKeyName,
|
||||||
|
category
|
||||||
} = e.currentTarget.dataset.set
|
} = e.currentTarget.dataset.set
|
||||||
if (taskName == "提交申请") {
|
if (taskName == "提交申请") {
|
||||||
if (procDefKey == "flow_xmglzdl_qjspb") {
|
if (procDefKey == "flow_xmglzdl_qjspb") {
|
||||||
wx.redirectTo({
|
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 {
|
} else {
|
||||||
wx.redirectTo({
|
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 {
|
} else {
|
||||||
//根据不同业务跳转不同表单
|
//根据不同业务跳转不同表单
|
||||||
if (procDefKey == "flow_xmglzdl_qjspb") {
|
if (procDefKey == "flow_xmglzdl_qjspb") {
|
||||||
wx.redirectTo({
|
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 {
|
} else {
|
||||||
wx.redirectTo({
|
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) {
|
onLoad(options) {
|
||||||
|
if(!getToken()){
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../login/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
let category;
|
let category;
|
||||||
if(options && options.category){
|
if(options && options.category){
|
||||||
category = options.category;
|
category = options.category;
|
||||||
|
|
@ -141,12 +155,8 @@ Page({
|
||||||
id: app.globalData.projectId
|
id: app.globalData.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
let myProjects = this.selectComponent("#projectSel");
|
||||||
fail: err => {
|
myProjects.load();
|
||||||
//未获取用户信息时,重新登录
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../pages/login/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
"van-popup": "@vant/weapp/popup/index",
|
"van-popup": "@vant/weapp/popup/index",
|
||||||
"van-divider":"@vant/weapp/divider/index",
|
"van-divider":"@vant/weapp/divider/index",
|
||||||
"van-sidebar":"@vant/weapp/sidebar/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"
|
"navigationStyle":"custom"
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="max_content">
|
<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;">
|
<view class="gd_max" style="margin-top: 20rpx;">
|
||||||
<van-row class="demo clearfix">
|
<van-row class="demo clearfix">
|
||||||
<van-col span="8" wx:for="{{typeList}}" wx:key="index">
|
<van-col span="8" wx:for="{{typeList}}" wx:key="index">
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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'}">
|
<van-divider content-position="left" :style="{padding:'90px 60px'}">
|
||||||
{{categoryName}}
|
{{categoryName}}
|
||||||
</van-divider>
|
</van-divider>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
/* pageage/project_checking_list/project_checking_list.wxss */
|
/* pageage/project_checking_list/project_checking_list.wxss */
|
||||||
|
.van-notice-bar{
|
||||||
|
background-color: #25345f !important;
|
||||||
|
}
|
||||||
.gd_max{
|
.gd_max{
|
||||||
padding:10rpx 50rpx 0;
|
padding:10rpx 50rpx 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
|
import {
|
||||||
|
getDictCache
|
||||||
|
} from '../../../api/publics'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -38,7 +41,9 @@ Page({
|
||||||
taskComType:"",
|
taskComType:"",
|
||||||
fileType: ["pdf"],
|
fileType: ["pdf"],
|
||||||
active: 100,
|
active: 100,
|
||||||
rejectNode:false
|
rejectNode:false,
|
||||||
|
subDeptTypes: [],
|
||||||
|
subDeptScopes: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -57,8 +62,12 @@ Page({
|
||||||
userId,
|
userId,
|
||||||
finishTime,
|
finishTime,
|
||||||
ret,
|
ret,
|
||||||
taskComType
|
taskComType,
|
||||||
|
procDefKey
|
||||||
} = options
|
} = options
|
||||||
|
if (procDefKey == "flow_fbzzsp_fbszzsp") {
|
||||||
|
this.getDicts();
|
||||||
|
}
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
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) {
|
getFlowNode(val) {
|
||||||
let flowNodeList = this.data.flowNodeList;
|
let flowNodeList = this.data.flowNodeList;
|
||||||
for (let i = 0; i < flowNodeList.length; i++) {
|
for (let i = 0; i < flowNodeList.length; i++) {
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
|
|
@ -84,6 +84,71 @@
|
||||||
<van-col span="18">{{nickName}}</van-col>
|
<van-col span="18">{{nickName}}</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</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">
|
<view class="inspect_overview_list">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">审批事项</text></van-col>
|
<van-col span="6"><text class="color_purple">审批事项</text></van-col>
|
||||||
|
|
@ -94,7 +159,7 @@
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6"><text class="color_purple">审批内容</text></van-col>
|
<van-col span="6"><text class="color_purple">审批内容</text></van-col>
|
||||||
<van-col span="18">
|
<van-col span="18">
|
||||||
<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">
|
<view class="in-img-div" wx:for="{{imageList}}" wx:key="index">
|
||||||
<image bindtap='showImg' data-set="{{item}}" src='{{item.minPath}}'></image>
|
<image bindtap='showImg' data-set="{{item}}" src='{{item.minPath}}'></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,15 @@
|
||||||
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
||||||
.problem_list_info_con{
|
.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{
|
.in-img-max:after{
|
||||||
display:block;
|
display:block;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" style="width: 100%;">
|
<view class="inspect_info_list" style="width: 100%;">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">请假时间</view>
|
<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-row>
|
||||||
<van-col span="10">
|
<van-col span="10">
|
||||||
<voucher-date counts="5" maxDate="{{maxDate}}" placeholder="开始时间" bindchange="onbeginDate" time="{{beginDate}}"></voucher-date>
|
<voucher-date counts="5" maxDate="{{maxDate}}" placeholder="开始时间" bindchange="onbeginDate" time="{{beginDate}}"></voucher-date>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
|
import {
|
||||||
|
getDictCache
|
||||||
|
} from '../../../api/publics'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -6,52 +9,72 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
maxDate:new Date(2088,1,1).getTime(),
|
maxDate: new Date(2088, 1, 1).getTime(),
|
||||||
deptName:"",
|
deptName: "",
|
||||||
userId:"",
|
userId: "",
|
||||||
nickName:"",
|
nickName: "",
|
||||||
loginName:"",
|
loginName: "",
|
||||||
projectId:"",
|
projectId: "",
|
||||||
projectName:"",
|
projectName: "",
|
||||||
procInsId:"",
|
procInsId: "",
|
||||||
infoData:{},
|
infoData: {},
|
||||||
procDefName:"",
|
procDefName: "",
|
||||||
deployId:"",
|
deployId: "",
|
||||||
activeName:"",
|
activeName: "",
|
||||||
flowNodeList:[],
|
flowNodeList: [],
|
||||||
flowNodes:[],
|
flowNodes: [],
|
||||||
comment:"",
|
comment: "",
|
||||||
taskId:"",
|
taskId: "",
|
||||||
procInsId:"",
|
procInsId: "",
|
||||||
backShow:false,
|
backShow: false,
|
||||||
targetKey:"",
|
targetKey: "",
|
||||||
targetKeyList:[],
|
targetKeyList: [],
|
||||||
taskName:"",
|
taskName: "",
|
||||||
passState:true,
|
passState: true,
|
||||||
backName:"",
|
backName: "",
|
||||||
ret:"",
|
ret: "",
|
||||||
remark:"",
|
remark: "",
|
||||||
filesData:[],
|
filesData: [],
|
||||||
limit:9,
|
limit: 30,
|
||||||
fileType:["pdf"],
|
fileType: ["pdf"],
|
||||||
imageType:["png","jpg","jpeg"],
|
imageType: ["png", "jpg", "jpeg"],
|
||||||
imageInfoData:[],
|
imageInfoData: [],
|
||||||
isFiles: null,
|
isFiles: null,
|
||||||
active: 100,
|
active: 100,
|
||||||
rejectNode:false
|
rejectNode: false,
|
||||||
|
fbAptitude: false,
|
||||||
|
subDeptTypes: [],
|
||||||
|
subDeptScopes: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
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({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success:res=>{
|
success: res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
projectId:app.globalData.projectId,
|
projectId: app.globalData.projectId,
|
||||||
projectName,
|
projectName,
|
||||||
procInsId,
|
procInsId,
|
||||||
procDefName,
|
procDefName,
|
||||||
|
|
@ -61,8 +84,8 @@ Page({
|
||||||
taskId,
|
taskId,
|
||||||
taskName,
|
taskName,
|
||||||
ret,
|
ret,
|
||||||
userId:res.data.userId,
|
userId: res.data.userId,
|
||||||
loginName:res.data.loginName,
|
loginName: res.data.loginName,
|
||||||
})
|
})
|
||||||
this.getFlowRecordList();
|
this.getFlowRecordList();
|
||||||
this.getFlowNodes();
|
this.getFlowNodes();
|
||||||
|
|
@ -72,13 +95,117 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getFlowNode(val){
|
//获取字典信息
|
||||||
|
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;
|
let flowNodeList = this.data.flowNodeList;
|
||||||
for(let i=0;i<flowNodeList.length;i++){
|
for (let i = 0; i < flowNodeList.length; i++) {
|
||||||
if(flowNodeList[i].id==val){
|
if (flowNodeList[i].id == val) {
|
||||||
let list = this.data.flowNodes;
|
let list = this.data.flowNodes;
|
||||||
let actNv = this.data.active;
|
let actNv = this.data.active;
|
||||||
if(flowNodeList[i].name==this.data.taskName){
|
if (flowNodeList[i].name == this.data.taskName) {
|
||||||
actNv = list.length;
|
actNv = list.length;
|
||||||
}
|
}
|
||||||
list.push({
|
list.push({
|
||||||
|
|
@ -87,10 +214,10 @@ Page({
|
||||||
text: flowNodeList[i].name.length > 4 ? flowNodeList[i].name.substring(0, 4) : flowNodeList[i].name
|
text: flowNodeList[i].name.length > 4 ? flowNodeList[i].name.substring(0, 4) : flowNodeList[i].name
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
active:actNv,
|
active: actNv,
|
||||||
flowNodes: list
|
flowNodes: list
|
||||||
})
|
})
|
||||||
if(flowNodeList[i].outgoingFlows && flowNodeList[i].outgoingFlows.length>0){
|
if (flowNodeList[i].outgoingFlows && flowNodeList[i].outgoingFlows.length > 0) {
|
||||||
return this.getFlowNode(flowNodeList[i].outgoingFlows[0].targetRef);
|
return this.getFlowNode(flowNodeList[i].outgoingFlows[0].targetRef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -98,22 +225,22 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询工作流节点
|
//查询工作流节点
|
||||||
getFlowNodes(){
|
getFlowNodes() {
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/flowTask/readNotes/'+that.data.deployId,
|
url: app.globalData.reqUrl + '/wechat/flowTask/readNotes/' + that.data.deployId,
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{},
|
data: {},
|
||||||
header: {
|
header: {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
that.setData({
|
that.setData({
|
||||||
flowNodeList:res.data
|
flowNodeList: res.data
|
||||||
})
|
})
|
||||||
if(res.data.length>0){
|
if (res.data.length > 0) {
|
||||||
let list = that.data.flowNodes;
|
let list = that.data.flowNodes;
|
||||||
list.push({
|
list.push({
|
||||||
id: res.data[0].id,
|
id: res.data[0].id,
|
||||||
|
|
@ -125,7 +252,7 @@ Page({
|
||||||
})
|
})
|
||||||
return that.getFlowNode(res.data[0].outgoingFlows[0].targetRef);
|
return that.getFlowNode(res.data[0].outgoingFlows[0].targetRef);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
app.toast(res.msg);
|
app.toast(res.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -133,42 +260,42 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询审批日志
|
//查询审批日志
|
||||||
getFlowRecordList(){
|
getFlowRecordList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/flowTask/findCommentByProcInsId',
|
url: app.globalData.reqUrl + '/wechat/flowTask/findCommentByProcInsId',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
procInsId:this.data.procInsId
|
procInsId: this.data.procInsId
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
that.setData({
|
that.setData({
|
||||||
flowRecordList:res.data
|
flowRecordList: res.data
|
||||||
})
|
})
|
||||||
let list=[];
|
let list = [];
|
||||||
res.data.forEach((item,idx)=>{
|
res.data.forEach((item, idx) => {
|
||||||
if(idx==1 && (item.commentType=="3" || item.commentType=="2")){
|
if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
|
||||||
that.setData({
|
that.setData({
|
||||||
rejectNode:true
|
rejectNode: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(item.deleteReason){
|
if (item.deleteReason) {
|
||||||
item.deleteReason=that.getDeleteReason(item.deleteReason);
|
item.deleteReason = that.getDeleteReason(item.deleteReason);
|
||||||
}
|
}
|
||||||
if(item.duration){
|
if (item.duration) {
|
||||||
item.duration=that.getDurationDate(item.duration);
|
item.duration = that.getDurationDate(item.duration);
|
||||||
}
|
}
|
||||||
list.push(item);
|
list.push(item);
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
flowRecordList:list
|
flowRecordList: list
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
app.toast(res.msg);
|
app.toast(res.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -176,45 +303,62 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询审批表单参数
|
//查询审批表单参数
|
||||||
getFormDatasList(){
|
getFormDatasList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/flowTask/findFormDatasByProcInsId',
|
url: app.globalData.reqUrl + '/wechat/flowTask/findFormDatasByProcInsId',
|
||||||
method:"get",
|
method: "get",
|
||||||
data:{
|
data: {
|
||||||
procInsId:this.data.procInsId
|
procInsId: this.data.procInsId
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
that.setData({
|
that.setData({
|
||||||
infoData:res.data
|
infoData: res.data,
|
||||||
})
|
})
|
||||||
let filesData = [];
|
let filesData = [];
|
||||||
let imageList = [];
|
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){
|
if (res.data.files) {
|
||||||
res.data.files.split(',').forEach(element => {
|
res.data.files.split(',').forEach(element => {
|
||||||
let ft = element.split('.');
|
let ft = element.split('.');
|
||||||
if(that.data.imageType.indexOf(ft[ft.length-1].toLowerCase())>-1){
|
if (that.data.imageType.indexOf(ft[ft.length - 1].toLowerCase()) > -1) {
|
||||||
imageList.push(config.baseUrl+element);
|
imageList.push(config.baseUrl + element);
|
||||||
}else{
|
} else {
|
||||||
let it = element.split('/');
|
let it = element.split('/');
|
||||||
filesData.push({name:it[it.length-1],path:element});
|
filesData.push({
|
||||||
|
name: it[it.length - 1],
|
||||||
|
path: element
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
that.setData({
|
that.setData({
|
||||||
filesData,
|
filesData,
|
||||||
imageInfoData:imageList,
|
imageInfoData: imageList,
|
||||||
isFiles:filesData.length>0?true:false,
|
isFiles: filesData.length > 0 ? true : false,
|
||||||
remark:res.data.remark,
|
remark: res.data.remark
|
||||||
filesData:filesData
|
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
app.toast(res.msg);
|
app.toast(res.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -222,28 +366,34 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//初始化退回节点
|
//初始化退回节点
|
||||||
initTargetKeyList(){
|
initTargetKeyList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/flowTask/returnList',
|
url: app.globalData.reqUrl + '/wechat/flowTask/returnList',
|
||||||
method:"post",
|
method: "post",
|
||||||
data:{
|
data: {
|
||||||
taskId:that.data.taskId
|
taskId: that.data.taskId
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
let list = [{id:'',text:''}];
|
let list = [{
|
||||||
res.data.forEach(item=>{
|
id: '',
|
||||||
list.push({id:item.id,text:item.name})
|
text: ''
|
||||||
|
}];
|
||||||
|
res.data.forEach(item => {
|
||||||
|
list.push({
|
||||||
|
id: item.id,
|
||||||
|
text: item.name
|
||||||
|
})
|
||||||
})
|
})
|
||||||
that.setData({
|
that.setData({
|
||||||
targetKeyList:list
|
targetKeyList: list
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
app.toast(res.msg);
|
app.toast(res.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -251,41 +401,116 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
//保存
|
||||||
onSave(){
|
onSave() {
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:true
|
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==""){
|
if (projectId == "" || loginName == "" || userId == "" || procDefId == "") {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(remark==""){
|
//分包资质审批数据效验
|
||||||
app.toast("请填写申请说明!")
|
if (fbAptitude) {
|
||||||
|
if (infoData.subDeptType == "") {
|
||||||
|
app.toast("请选择分包类型!")
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(filesData.length==0 && this.data.imageInfoData.length==0){
|
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("请上传审批内容!")
|
app.toast("请上传审批内容!")
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for(let i=0;i<filesData.length;i++){
|
if (remark == "") {
|
||||||
let _fileType = filesData[0].path.split('.');
|
app.toast("请填写申请说明!")
|
||||||
_fileType = _fileType[_fileType.length-1].toLowerCase();
|
|
||||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
|
||||||
if(this.data.fileType.indexOf(_fileType)==-1){
|
|
||||||
app.toast("申批内容不支持 [ "+_fileType+" ] 格式!请上传PDF文件。")
|
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (let i = 0; i < filesData.length; i++) {
|
||||||
|
let _fileType = filesData[0].path.split('.');
|
||||||
|
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||||
|
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||||
|
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||||
|
app.toast("申批内容不支持 [ " + _fileType + " ] 格式!请上传PDF文件。")
|
||||||
|
this.setData({
|
||||||
|
loadShow: false
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -293,14 +518,14 @@ Page({
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '是否确定提交'+this.data.procDefName+'?',
|
content: '是否确定提交' + this.data.procDefName + '?',
|
||||||
success: function (sm) {
|
success: function (sm) {
|
||||||
if (sm.confirm) {
|
if (sm.confirm) {
|
||||||
// 用户点击了确定 可以调用了
|
// 用户点击了确定 可以调用了
|
||||||
that.submit()
|
that.submit()
|
||||||
} else if (sm.cancel) {
|
} else if (sm.cancel) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
});
|
});
|
||||||
console.log('用户点击取消');
|
console.log('用户点击取消');
|
||||||
}
|
}
|
||||||
|
|
@ -308,69 +533,98 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
submit(){
|
submit() {
|
||||||
let that = this
|
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 = [];
|
let fileUrls = [];
|
||||||
filesData.forEach( f =>{
|
filesData.forEach(f => {
|
||||||
imageInfoData.push(f.path);
|
imageInfoData.push(f.path);
|
||||||
});
|
});
|
||||||
imageInfoData.forEach(async (item)=>{
|
imageInfoData.forEach(async (item) => {
|
||||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||||
let name = "file"
|
let name = "file"
|
||||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||||
if(item.indexOf(config.baseUrl)>-1){
|
if (item.indexOf(config.baseUrl) > -1) {
|
||||||
fileUrls.push(item.replace(config.baseUrl,''));
|
fileUrls.push(item.replace(config.baseUrl, ''));
|
||||||
}else if(item.indexOf("/profile/")>-1){
|
} else if (item.indexOf("/profile/") > -1) {
|
||||||
fileUrls.push(item);
|
fileUrls.push(item);
|
||||||
}else{
|
} else {
|
||||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||||
fileUrls.push(obj.data.fileName);
|
fileUrls.push(obj.data.fileName);
|
||||||
}
|
}
|
||||||
//验证图片上传完毕
|
//验证图片上传完毕
|
||||||
if(fileUrls.length == imageInfoData.length){
|
if (fileUrls.length == imageInfoData.length) {
|
||||||
|
//分包单位资质审批参数
|
||||||
|
let 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 = {
|
let params = {
|
||||||
taskId,
|
taskId,
|
||||||
instanceId:procInsId,
|
instanceId: procInsId,
|
||||||
userId,
|
userId,
|
||||||
assignee:nickName,
|
assignee: nickName,
|
||||||
variables:{
|
variables: {
|
||||||
businessKey:projectId,
|
businessKey: projectId,
|
||||||
projectName,
|
projectName,
|
||||||
files:fileUrls.toString(),
|
files: fileUrls.toString(),
|
||||||
remark,
|
remark,
|
||||||
INITIATOR:that.data.infoData.INITIATOR
|
INITIATOR: that.data.infoData.INITIATOR,
|
||||||
|
...fbAptitudeParams
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.globalData.reqUrl + '/wechat/flowTask/complete',
|
url: app.globalData.reqUrl + '/wechat/flowTask/complete',
|
||||||
method:"POST",
|
method: "POST",
|
||||||
data:params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"Username": loginName,
|
"Username": loginName,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
success(res){
|
success(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
loadShow:false
|
loadShow: false
|
||||||
})
|
})
|
||||||
res = res.data
|
res = res.data
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
app.toast("提交申请成功!")
|
app.toast("提交申请成功!")
|
||||||
if(that.data.ret=="await"){
|
if (that.data.ret == "await") {
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../await/index',
|
url: '../await/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}else{
|
} else {
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../myFlowDefinition/index',
|
url: '../myFlowDefinition/index',
|
||||||
})
|
})
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
app.toast(res.msg);
|
app.toast(res.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -382,7 +636,7 @@ Page({
|
||||||
/**
|
/**
|
||||||
* 这里考虑上传图片异步问题,封装为同步
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
*/
|
*/
|
||||||
syncUploadImage(url,uploadFile,name) {
|
syncUploadImage(url, uploadFile, name) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url, // 上传的服务器接口地址
|
url, // 上传的服务器接口地址
|
||||||
|
|
@ -391,7 +645,9 @@ Page({
|
||||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||||
},
|
},
|
||||||
name, //上传的所需字段,后端提供
|
name, //上传的所需字段,后端提供
|
||||||
formData: { user: 'test' },
|
formData: {
|
||||||
|
user: 'test'
|
||||||
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 上传完成操作
|
// 上传完成操作
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
|
|
@ -431,8 +687,8 @@ Page({
|
||||||
* 上传文件
|
* 上传文件
|
||||||
* @param {*} options
|
* @param {*} options
|
||||||
*/
|
*/
|
||||||
fileUpload(options){
|
fileUpload(options) {
|
||||||
let file=options.detail;
|
let file = options.detail;
|
||||||
this.setData({
|
this.setData({
|
||||||
filesData: file
|
filesData: file
|
||||||
});
|
});
|
||||||
|
|
@ -449,17 +705,17 @@ Page({
|
||||||
* 计算驳回节点
|
* 计算驳回节点
|
||||||
* @param {*} val
|
* @param {*} val
|
||||||
*/
|
*/
|
||||||
getDeleteReason(val){
|
getDeleteReason(val) {
|
||||||
val = val.replace("Change activity to ","");
|
val = val.replace("Change activity to ", "");
|
||||||
let flowRecordList = this.data.flowRecordList;
|
let flowRecordList = this.data.flowRecordList;
|
||||||
for(let i=0;i<flowRecordList.length;i++){
|
for (let i = 0; i < flowRecordList.length; i++) {
|
||||||
if(flowRecordList[i].taskDefKey==val){
|
if (flowRecordList[i].taskDefKey == val) {
|
||||||
return "驳回至"+flowRecordList[i].taskName;
|
return "驳回至" + flowRecordList[i].taskName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getDurationDate(val){
|
getDurationDate(val) {
|
||||||
// 计算出相差天数
|
// 计算出相差天数
|
||||||
let days = Math.floor(val / (24 * 3600 * 1000))
|
let days = Math.floor(val / (24 * 3600 * 1000))
|
||||||
// 计算出小时数
|
// 计算出小时数
|
||||||
|
|
@ -471,47 +727,47 @@ Page({
|
||||||
// 计算相差秒数
|
// 计算相差秒数
|
||||||
let leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
|
let leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
|
||||||
let seconds = Math.round(leave3 / 1000)
|
let seconds = Math.round(leave3 / 1000)
|
||||||
if(days>0){
|
if (days > 0) {
|
||||||
if(days<10) days = "0"+days;
|
if (days < 10) days = "0" + days;
|
||||||
if(hours<10) hours = "0"+hours;
|
if (hours < 10) hours = "0" + hours;
|
||||||
if(minutes<10) minutes = "0"+minutes;
|
if (minutes < 10) minutes = "0" + minutes;
|
||||||
if(seconds<10) seconds = "0"+seconds;
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
|
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
|
||||||
}
|
}
|
||||||
if(hours>0){
|
if (hours > 0) {
|
||||||
if(hours<10) hours = "0"+hours;
|
if (hours < 10) hours = "0" + hours;
|
||||||
if(minutes<10) minutes = "0"+minutes;
|
if (minutes < 10) minutes = "0" + minutes;
|
||||||
if(seconds<10) seconds = "0"+seconds;
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
return hours + '小时' + minutes + '分钟' + seconds + '秒';
|
return hours + '小时' + minutes + '分钟' + seconds + '秒';
|
||||||
}
|
}
|
||||||
if(minutes>0){
|
if (minutes > 0) {
|
||||||
if(minutes<10) minutes = "0"+minutes;
|
if (minutes < 10) minutes = "0" + minutes;
|
||||||
if(seconds<10) seconds = "0"+seconds;
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
return minutes + '分钟' + seconds + '秒';
|
return minutes + '分钟' + seconds + '秒';
|
||||||
}
|
}
|
||||||
if(seconds>0){
|
if (seconds > 0) {
|
||||||
if(seconds<10) seconds = "0"+seconds;
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
return seconds + '秒';
|
return seconds + '秒';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//选择退回节点
|
//选择退回节点
|
||||||
onSelectTargetKey(e){
|
onSelectTargetKey(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
targetKey:e.detail.id,
|
targetKey: e.detail.id,
|
||||||
backName:e.detail.name
|
backName: e.detail.name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
returnToPage: function () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
if(this.data.ret=="await"){
|
if (this.data.ret == "await") {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../await/index',
|
url: '../await/index',
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../myFlowDefinition/index'
|
url: '../myProcessIns/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -524,13 +780,13 @@ Page({
|
||||||
this.setData({
|
this.setData({
|
||||||
isFiles: !this.data.isFiles,
|
isFiles: !this.data.isFiles,
|
||||||
});
|
});
|
||||||
if(this.data.isFiles){
|
if (this.data.isFiles) {
|
||||||
if(this.data.filesData.length==0){
|
if (this.data.filesData.length == 0) {
|
||||||
let myImages = this.selectComponent("#myImage");
|
let myImages = this.selectComponent("#myImage");
|
||||||
myImages.upload();
|
myImages.upload();
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if(this.data.imageInfoData.length==0){
|
if (this.data.imageInfoData.length == 0) {
|
||||||
let myFiles = this.selectComponent("#myFiles");
|
let myFiles = this.selectComponent("#myFiles");
|
||||||
myFiles.upload();
|
myFiles.upload();
|
||||||
}
|
}
|
||||||
|
|
@ -538,13 +794,13 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
//取消页面
|
||||||
cancelSaveView(){
|
cancelSaveView() {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
if(this.data.ret=="await"){
|
if (this.data.ret == "await") {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../await/index',
|
url: '../await/index',
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../myFlowDefinition/index'
|
url: '../myFlowDefinition/index'
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
"van-overlay": "@vant/weapp/overlay/index",
|
"van-overlay": "@vant/weapp/overlay/index",
|
||||||
"van-collapse": "@vant/weapp/collapse",
|
"van-collapse": "@vant/weapp/collapse",
|
||||||
"van-steps": "@vant/weapp/steps/index",
|
"van-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"
|
"navigationStyle":"custom"
|
||||||
}
|
}
|
||||||
|
|
@ -90,6 +90,63 @@
|
||||||
{{procDefName}}
|
{{procDefName}}
|
||||||
</view>
|
</view>
|
||||||
</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_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="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 class="module_see_info_switct" bindtap="switchFiles" wx:if="{{filesData.length==0}}">
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
.van-popup{
|
.van-popup{
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
.van-notice-bar{
|
||||||
|
background-color: #25345f !important;
|
||||||
|
}
|
||||||
.van-image__img{
|
.van-image__img{
|
||||||
border-radius: 10rpx !important;
|
border-radius: 10rpx !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
import {
|
||||||
|
getDictCache
|
||||||
|
} from '../../../api/publics'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
@ -6,6 +9,7 @@ Page({
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
maxDate: new Date(2088, 1, 1).getTime(),
|
maxDate: new Date(2088, 1, 1).getTime(),
|
||||||
|
minDate: new Date(2001, 1, 1).getTime(),
|
||||||
deptId: "",
|
deptId: "",
|
||||||
deptName: "",
|
deptName: "",
|
||||||
userId: "",
|
userId: "",
|
||||||
|
|
@ -15,7 +19,7 @@ Page({
|
||||||
projectName: "",
|
projectName: "",
|
||||||
remark: "",
|
remark: "",
|
||||||
filesData: [],
|
filesData: [],
|
||||||
limit: 9,
|
limit: 30,
|
||||||
fileType: ["pdf", "png", "jpg", "jpeg"],
|
fileType: ["pdf", "png", "jpg", "jpeg"],
|
||||||
procDefId: "",
|
procDefId: "",
|
||||||
approveTitle: "",
|
approveTitle: "",
|
||||||
|
|
@ -26,6 +30,18 @@ Page({
|
||||||
isFiles: false,
|
isFiles: false,
|
||||||
imageInfoData: [],
|
imageInfoData: [],
|
||||||
active: 0,
|
active: 0,
|
||||||
|
fbAptitude: false,
|
||||||
|
subDeptType: "",
|
||||||
|
subDeptTypes: [],
|
||||||
|
subDeptScope: "",
|
||||||
|
subDeptScopes: [],
|
||||||
|
subDeptName: "",
|
||||||
|
subDeptAptitude: "",
|
||||||
|
subDeptChairman: "",
|
||||||
|
subDeptSafetyCertificate: "",
|
||||||
|
subDeptCustodian: "",
|
||||||
|
subDeptCustodianCardId: "",
|
||||||
|
subDeptApproachDate: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -35,8 +51,15 @@ Page({
|
||||||
let {
|
let {
|
||||||
procDefId,
|
procDefId,
|
||||||
approveTitle,
|
approveTitle,
|
||||||
deploymentId
|
deploymentId,
|
||||||
|
procDefKey
|
||||||
} = options
|
} = options
|
||||||
|
if (procDefKey == "flow_fbzzsp_fbszzsp") {
|
||||||
|
this.getDicts();
|
||||||
|
this.setData({
|
||||||
|
fbAptitude: true
|
||||||
|
})
|
||||||
|
}
|
||||||
//获取缓存数据
|
//获取缓存数据
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
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) {
|
getFlowNode(val) {
|
||||||
let flowNodeList = this.data.flowNodeList;
|
let flowNodeList = this.data.flowNodeList;
|
||||||
for (let i = 0; i < flowNodeList.length; i++) {
|
for (let i = 0; i < flowNodeList.length; i++) {
|
||||||
|
|
@ -132,7 +264,17 @@ Page({
|
||||||
userId,
|
userId,
|
||||||
loginName,
|
loginName,
|
||||||
remark,
|
remark,
|
||||||
filesData
|
filesData,
|
||||||
|
fbAptitude,
|
||||||
|
subDeptType,
|
||||||
|
subDeptScope,
|
||||||
|
subDeptName,
|
||||||
|
subDeptAptitude,
|
||||||
|
subDeptChairman,
|
||||||
|
subDeptSafetyCertificate,
|
||||||
|
subDeptCustodian,
|
||||||
|
subDeptCustodianCardId,
|
||||||
|
subDeptApproachDate
|
||||||
} = this.data;
|
} = this.data;
|
||||||
//数据效验
|
//数据效验
|
||||||
if (projectId == "" || loginName == "" || userId == "" || procDefId == "") {
|
if (projectId == "" || loginName == "" || userId == "" || procDefId == "") {
|
||||||
|
|
@ -142,13 +284,72 @@ Page({
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (remark == "") {
|
//分包资质审批数据效验
|
||||||
app.toast("请填写申请说明!")
|
if (fbAptitude) {
|
||||||
|
if (subDeptType == "") {
|
||||||
|
app.toast("请选择分包类型!")
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow: false
|
loadShow: false
|
||||||
})
|
})
|
||||||
return;
|
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) {
|
if (filesData.length == 0 && this.data.imageInfoData.length == 0) {
|
||||||
app.toast("请上传审批内容!")
|
app.toast("请上传审批内容!")
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|
@ -156,6 +357,13 @@ Page({
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (remark == "") {
|
||||||
|
app.toast("请填写申请说明!")
|
||||||
|
this.setData({
|
||||||
|
loadShow: false
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (let i = 0; i < filesData.length; i++) {
|
for (let i = 0; i < filesData.length; i++) {
|
||||||
let _fileType = filesData[0].path.split('.');
|
let _fileType = filesData[0].path.split('.');
|
||||||
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||||
|
|
@ -198,7 +406,17 @@ Page({
|
||||||
nickName,
|
nickName,
|
||||||
remark,
|
remark,
|
||||||
filesData,
|
filesData,
|
||||||
imageInfoData
|
imageInfoData,
|
||||||
|
fbAptitude,
|
||||||
|
subDeptType,
|
||||||
|
subDeptScope,
|
||||||
|
subDeptName,
|
||||||
|
subDeptAptitude,
|
||||||
|
subDeptChairman,
|
||||||
|
subDeptSafetyCertificate,
|
||||||
|
subDeptCustodian,
|
||||||
|
subDeptCustodianCardId,
|
||||||
|
subDeptApproachDate
|
||||||
} = that.data;
|
} = that.data;
|
||||||
let fileUrls = [];
|
let fileUrls = [];
|
||||||
filesData.forEach(f => {
|
filesData.forEach(f => {
|
||||||
|
|
@ -212,6 +430,21 @@ Page({
|
||||||
fileUrls.push(obj.data.fileName);
|
fileUrls.push(obj.data.fileName);
|
||||||
//验证图片上传完毕
|
//验证图片上传完毕
|
||||||
if (fileUrls.length == imageInfoData.length) {
|
if (fileUrls.length == imageInfoData.length) {
|
||||||
|
//分包单位资质审批参数
|
||||||
|
let fbAptitudeParams = {};
|
||||||
|
if(fbAptitude){
|
||||||
|
fbAptitudeParams = {
|
||||||
|
subDeptType,
|
||||||
|
subDeptScope,
|
||||||
|
subDeptName,
|
||||||
|
subDeptAptitude,
|
||||||
|
subDeptChairman,
|
||||||
|
subDeptSafetyCertificate,
|
||||||
|
subDeptCustodian,
|
||||||
|
subDeptCustodianCardId,
|
||||||
|
subDeptApproachDate
|
||||||
|
}
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
procDefId,
|
procDefId,
|
||||||
userId,
|
userId,
|
||||||
|
|
@ -222,6 +455,7 @@ Page({
|
||||||
projectName,
|
projectName,
|
||||||
files: fileUrls.toString(),
|
files: fileUrls.toString(),
|
||||||
remark,
|
remark,
|
||||||
|
...fbAptitudeParams
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wx.request({
|
wx.request({
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
"van-overlay": "@vant/weapp/overlay/index",
|
"van-overlay": "@vant/weapp/overlay/index",
|
||||||
"van-collapse": "@vant/weapp/collapse",
|
"van-collapse": "@vant/weapp/collapse",
|
||||||
"van-steps": "@vant/weapp/steps/index",
|
"van-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"
|
"navigationStyle":"custom"
|
||||||
}
|
}
|
||||||
|
|
@ -46,6 +46,63 @@
|
||||||
{{approveTitle}}
|
{{approveTitle}}
|
||||||
</view>
|
</view>
|
||||||
</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_list" style="width: 100%;" wx:if="{{!isFiles}}">
|
||||||
<view class="inspect_info_title module_title_flex" style="padding: 20rpx 0 10rpx;">审批内容 [仅可上传图片]
|
<view class="inspect_info_title module_title_flex" style="padding: 20rpx 0 10rpx;">审批内容 [仅可上传图片]
|
||||||
<view class="module_see_info_switct" bindtap="switchFiles">
|
<view class="module_see_info_switct" bindtap="switchFiles">
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
.van-popup{
|
.van-popup{
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
.van-notice-bar{
|
||||||
|
background-color: #25345f !important;
|
||||||
|
}
|
||||||
.van-image__img{
|
.van-image__img{
|
||||||
border-radius: 10rpx !important;
|
border-radius: 10rpx !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,14 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
addInfo(e){
|
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"){
|
if(flowKey=="flow_xmglzdl_qjspb"){
|
||||||
wx.redirectTo({
|
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{
|
}else{
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../initTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}`,
|
url: `../initTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}&procDefKey=${flowKey}&category=${category}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<view class="inspect_list_title">
|
<view class="inspect_list_title">
|
||||||
<view class="inspect_list_title_label inspect_list_title_width">
|
<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="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>
|
</view>
|
||||||
<view class="inspect_list_info">
|
<view class="inspect_list_info">
|
||||||
|
|
|
||||||
|
|
@ -49,29 +49,29 @@ Page({
|
||||||
},
|
},
|
||||||
|
|
||||||
getInfo(e){
|
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){
|
if(!finishTime){
|
||||||
finishTime="";
|
finishTime="";
|
||||||
}
|
}
|
||||||
if(taskName=="提交申请"){
|
if(taskName=="提交申请"){
|
||||||
if(procDefKey=="flow_xmglzdl_qjspb"){
|
if(procDefKey=="flow_xmglzdl_qjspb"){
|
||||||
wx.redirectTo({
|
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{
|
}else{
|
||||||
wx.redirectTo({
|
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{
|
}else{
|
||||||
//根据不同业务跳转不同表单
|
//根据不同业务跳转不同表单
|
||||||
if(procDefKey=="flow_xmglzdl_qjspb"){
|
if(procDefKey=="flow_xmglzdl_qjspb"){
|
||||||
wx.redirectTo({
|
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{
|
}else{
|
||||||
wx.redirectTo({
|
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}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_list_info">
|
<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_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.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>
|
<view class="inspect_list_info_data_prop">当前节点:<text wx:if="{{item.finishTime == null}}">{{item.taskName}}</text>
|
||||||
<text wx:if="{{item.finishTime != null}}">流程结束</text>
|
<text wx:if="{{item.finishTime != null}}">流程结束</text>
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,8 @@ Page({
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key: 'userinfo',
|
key: 'userinfo',
|
||||||
success: res => {
|
success: res => {
|
||||||
//config.manageUrl +
|
|
||||||
this.setData({
|
this.setData({
|
||||||
url:"https://szgcwx.jhncidg.com/wechat/wxAuth/authorize?userOpenId=" + res.data.openId
|
url:config.baseUrl+"/wechat/wxAuth/authorize?userOpenId=" + res.data.openId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"usingComponents": {}
|
"usingComponents": {},
|
||||||
|
"navigationStyle":"custom"
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue