提交代码
parent
ec75179b6d
commit
c3cf671949
|
@ -1,4 +1,6 @@
|
|||
import {request} from '../utils/request'
|
||||
import {
|
||||
request
|
||||
} from '../utils/request'
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
|
@ -8,19 +10,28 @@ export function getCodeImg() {
|
|||
})
|
||||
}
|
||||
|
||||
// 登录方法
|
||||
// 用户登录
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/wxApi/login',
|
||||
url: '/wechat/login',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 登录方法
|
||||
// 修改密码
|
||||
export function updatePwd(data) {
|
||||
return request({
|
||||
url: '/wxApi/updatePwd',
|
||||
url: '/wechat/v1/updatePassword',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改密码
|
||||
export function codeUpdatePwd(data) {
|
||||
return request({
|
||||
url: '/wechat/v1/codeUpdatePwd',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
|
@ -34,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) {
|
||||
return request({
|
||||
'url': '/wechat/findOpenUserMsgId/'+openId,
|
||||
'url': '/wechat/findOpenUserMsgId/' + openId,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
@ -45,7 +67,7 @@ export function findOpenUserMsgId(openId) {
|
|||
// 删除公众号消息授权
|
||||
export function delOpenUserMsgId(openId) {
|
||||
return request({
|
||||
'url': '/wechat/delOpenUserMsgId/'+openId,
|
||||
'url': '/wechat/delOpenUserMsgId/' + openId,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
|
@ -56,4 +56,12 @@ export function findProjectApplyData(id){
|
|||
url: '/wxApi/publics/projectApply/'+id,
|
||||
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(){
|
||||
|
@ -78,11 +80,18 @@ App({
|
|||
})
|
||||
}
|
||||
this.autoUpdate();
|
||||
if(!getToken()){
|
||||
setTimeout(() => {
|
||||
this.toast("请使用手机号码登录",1500);
|
||||
}, 1000);
|
||||
wx.redirectTo({
|
||||
url: '/pages/login/index',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(){
|
||||
|
||||
},
|
||||
onLoad(){},
|
||||
|
||||
//页面弹窗
|
||||
toast: function (msg) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/login/index",
|
||||
"pages/alter-ps/index",
|
||||
"pages/wx-auth/index",
|
||||
"pages/gongchengliebiao/index",
|
||||
"pages/gengduogongneng/index",
|
||||
|
|
|
@ -1867,4 +1867,8 @@ swiper-item video {
|
|||
}
|
||||
.van-steps--horizontal{
|
||||
padding: 10px 20px !important;
|
||||
}
|
||||
|
||||
.files_parent{
|
||||
margin-bottom: 20rpx;
|
||||
}
|
|
@ -4,6 +4,5 @@ module.exports = {
|
|||
appId: "wx9997d071b4996f23",
|
||||
//baseUrl: 'http://127.0.0.1:8091',
|
||||
baseUrl: 'https://szgcwx.jhncidg.com',
|
||||
manageUrl: 'https://szgc.jhncidg.com',
|
||||
noSecuritys:['/wechat/captchaImage','/wxApi/login']
|
||||
noSecuritys:['/wechat/captchaImage','/wechat/login','/wechat/v1/sendPhoneMessage','/wechat/v1/codeUpdatePwd']
|
||||
};
|
|
@ -151,14 +151,14 @@
|
|||
</view>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">处理意见 <text style="color: #fd6060;">[必填项]</text></view>
|
||||
<view class="inspect_info_title">处理意见 <text class="code_label_2" style="color: #fd6060;">[必填项]</text></view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写处理意见(600字内)"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputFlowComment" maxlength="600"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">凭证附件 <text style="color: #CCC;">[非必填]</text></view>
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">凭证附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
|
||||
<view class="problem_list_info_con">
|
||||
<file-uploader bindimages="onImagesArr" limit="{{9}}"></file-uploader>
|
||||
</view>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import {list,findGroupCountByApprove} from "../../../api/flowLabour"
|
||||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -38,19 +41,19 @@ Page({
|
|||
wx.redirectTo({
|
||||
url: `../check/index?id=${id}`,
|
||||
})
|
||||
}else if(this.data.minRoleId=='4' (approveStatus == '20' || approveStatus == '31')){
|
||||
}else if(this.data.minRoleId=='4' && (approveStatus == '20' || approveStatus == '31')){
|
||||
wx.redirectTo({
|
||||
url: `../check/index?id=${id}`,
|
||||
})
|
||||
}else if(this.data.minRoleId=='4' (approveStatus == '10' || approveStatus == '21')){
|
||||
}else if(this.data.minRoleId=='4' && (approveStatus == '10' || approveStatus == '21')){
|
||||
wx.redirectTo({
|
||||
url: `../info/index?id=${id}`,
|
||||
})
|
||||
}else if(this.data.minRoleId!='4' (approveStatus == '10' || approveStatus == '21')){
|
||||
}else if(this.data.minRoleId!='4' && (approveStatus == '10' || approveStatus == '21')){
|
||||
wx.redirectTo({
|
||||
url: `../check/index?id=${id}`,
|
||||
})
|
||||
}else if(this.data.minRoleId!='4' (approveStatus == '20' || approveStatus == '31')){
|
||||
}else if(this.data.minRoleId!='4' && (approveStatus == '20' || approveStatus == '31')){
|
||||
wx.redirectTo({
|
||||
url: `../info/index?id=${id}`,
|
||||
})
|
||||
|
@ -66,6 +69,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/login/index',
|
||||
})
|
||||
}
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
|
@ -95,12 +103,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
@ -175,13 +179,17 @@ Page({
|
|||
//判断角色,
|
||||
let mr = this.data.minRoleId;
|
||||
let deptId = this.data.deptId;
|
||||
let projDept = this.data.deptId;
|
||||
if (mr == 2 || mr == 3 || mr == 4) {
|
||||
deptId = 0;
|
||||
}
|
||||
if(mr == 4){
|
||||
projDept = app.globalData.projectInfoList[0].deptId
|
||||
}
|
||||
let param = {
|
||||
"projectId": this.data.projectId,
|
||||
"deptId": deptId,
|
||||
"nowDept": deptId,
|
||||
"nowDept": projDept,
|
||||
"nowRole": mr,
|
||||
"nowUser": this.data.loginName,
|
||||
"activeName": that.data.activeState
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
||||
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||
|
@ -26,11 +26,11 @@
|
|||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text_3">投诉时间:{{format.parseDate(item.createTime)}}</view>
|
||||
<view wx:if="{{item.approveStatus=='10'}}" class="code_label_4 code_label_blueviolet">待项目经理审批</view>
|
||||
<view wx:if="{{item.approveStatus=='21'}}" class="code_label_4 code_label_red">甲方代表审批驳回</view>
|
||||
<view wx:if="{{item.approveStatus=='20'}}" class="code_label_4 code_label_blueviolet">待甲方代表审批</view>
|
||||
<view wx:if="{{item.approveStatus=='31'}}" class="code_label_4 code_label_red">集团公司审批驳回</view>
|
||||
<view wx:if="{{item.approveStatus=='30'}}" class="code_label_4 code_label_blueviolet">待集团公司审批</view>
|
||||
<view wx:if="{{item.approveStatus=='10'}}" class="code_label_4 code_label_blueviolet">待项目经理办</view>
|
||||
<view wx:if="{{item.approveStatus=='21'}}" class="code_label_4 code_label_red">甲方代表驳回</view>
|
||||
<view wx:if="{{item.approveStatus=='20'}}" class="code_label_4 code_label_blueviolet">待甲方代表审</view>
|
||||
<view wx:if="{{item.approveStatus=='31'}}" class="code_label_4 code_label_red">集团公司驳回</view>
|
||||
<view wx:if="{{item.approveStatus=='30'}}" class="code_label_4 code_label_blueviolet">待集团公司审</view>
|
||||
<view wx:if="{{item.approveStatus=='100'}}" class="code_label_4 code_label_green">审批完成</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/addSafetyInspect/index.js
|
||||
import {
|
||||
syncFileUpload
|
||||
} from '../../../utils/request'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -6,92 +8,116 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
maxDate:new Date(2088,1,1).getTime(),
|
||||
currentDate:new Date().getTime(),
|
||||
deptId:"",
|
||||
projectId:"",
|
||||
projectName:"",
|
||||
loginName:"",
|
||||
rectifierData:[],
|
||||
loadShow:false,
|
||||
checkTypeList:[],
|
||||
checkType:"1",
|
||||
materialName:"",
|
||||
usePosition:"",
|
||||
sampleNum:"",
|
||||
qualifiedFlag:"Y",
|
||||
witnessUser:"",
|
||||
witnessUserName:"",
|
||||
checkTime:"",
|
||||
laboratoryName:"",
|
||||
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 0
|
||||
maxDate: new Date(2088, 1, 1).getTime(),
|
||||
deptId: "",
|
||||
projectId: "",
|
||||
projectName: "",
|
||||
loginName: "",
|
||||
rectifierData: [],
|
||||
loadShow: false,
|
||||
checkTypeList: [],
|
||||
checkType: "1",
|
||||
materialName: "",
|
||||
usePosition: "",
|
||||
sampleNum: "",
|
||||
qualifiedFlag: "Y",
|
||||
witnessUser: "",
|
||||
witnessUserName: "",
|
||||
checkTime: "",
|
||||
laboratoryName: "",
|
||||
qualifiedFlagList: [{
|
||||
id: 'Y',
|
||||
text: "是"
|
||||
}, {
|
||||
id: 'N',
|
||||
text: "否"
|
||||
}],
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '检测报告'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 0,
|
||||
trustDeed: [],
|
||||
attachment: [],
|
||||
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {projectId,projectName} = options
|
||||
let {
|
||||
projectId,
|
||||
projectName
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
projectId,
|
||||
projectName,
|
||||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName,
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getTypeList();
|
||||
}
|
||||
})
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
projectId,
|
||||
projectName,
|
||||
deptId: res.data.deptId,
|
||||
loginName: res.data.loginName,
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getTypeList();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询项目人员数据
|
||||
getProjectUserData(){
|
||||
getProjectUserData() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method:"get",
|
||||
data:{
|
||||
unitType:"4",
|
||||
projectId:that.data.projectId
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method: "get",
|
||||
data: {
|
||||
unitType: "4",
|
||||
projectId: that.data.projectId
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
rectifierData:res.data
|
||||
rectifierData: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getTypeList(){
|
||||
getTypeList() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectDetection/queryType',
|
||||
method:"get",
|
||||
data:{},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/queryType',
|
||||
method: "get",
|
||||
data: {},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let list=[];
|
||||
res.data.forEach(it =>{
|
||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
res.data.forEach(it => {
|
||||
list.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
checkTypeList:list
|
||||
checkTypeList: list
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +125,7 @@ Page({
|
|||
},
|
||||
|
||||
//材料名称
|
||||
onInputMaterialNameValue(e){
|
||||
onInputMaterialNameValue(e) {
|
||||
let materialName = e.detail.value
|
||||
this.setData({
|
||||
materialName
|
||||
|
@ -107,29 +133,29 @@ Page({
|
|||
},
|
||||
|
||||
//使用部位
|
||||
onInputUsePositionValue(e){
|
||||
onInputUsePositionValue(e) {
|
||||
let usePosition = e.detail.value
|
||||
this.setData({
|
||||
usePosition
|
||||
})
|
||||
},
|
||||
//取样数量
|
||||
onInputSampleNumValue(e){
|
||||
onInputSampleNumValue(e) {
|
||||
let sampleNum = e.detail.value
|
||||
this.setData({
|
||||
sampleNum
|
||||
})
|
||||
},
|
||||
//送检实验室名称
|
||||
onInputLaboratoryNameValue(e){
|
||||
onInputLaboratoryNameValue(e) {
|
||||
let laboratoryName = e.detail.value
|
||||
this.setData({
|
||||
laboratoryName
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//验收时间
|
||||
onInputTime(e){
|
||||
onInputTime(e) {
|
||||
let checkTime = e.detail
|
||||
this.setData({
|
||||
checkTime
|
||||
|
@ -137,118 +163,38 @@ Page({
|
|||
},
|
||||
|
||||
//添加监理专员
|
||||
onAddSend(e){
|
||||
if(e.detail.length>0){
|
||||
let phoneNumbers="";
|
||||
let userNames="";
|
||||
e.detail.forEach(it =>{
|
||||
phoneNumbers+=","+it.phoneNumber;
|
||||
userNames+=","+it.userName;
|
||||
onAddSend(e) {
|
||||
if (e.detail.length > 0) {
|
||||
let phoneNumbers = "";
|
||||
let userNames = "";
|
||||
e.detail.forEach(it => {
|
||||
phoneNumbers += "," + it.phoneNumber;
|
||||
userNames += "," + it.userName;
|
||||
});
|
||||
this.setData({
|
||||
witnessUserName:userNames.substring(1),
|
||||
witnessUser:phoneNumbers.substring(1)
|
||||
witnessUserName: userNames.substring(1),
|
||||
witnessUser: phoneNumbers.substring(1)
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.setData({
|
||||
witnessUser:"",
|
||||
witnessUserName:""
|
||||
witnessUser: "",
|
||||
witnessUserName: ""
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
//保存
|
||||
onSubmitSave(){
|
||||
onSubmitSave() {
|
||||
this.setData({
|
||||
loadShow:true
|
||||
loadShow: true
|
||||
})
|
||||
let that = this
|
||||
let {projectId,deptId,checkType,
|
||||
materialName,
|
||||
usePosition,
|
||||
sampleNum,
|
||||
qualifiedFlag,
|
||||
witnessUser,
|
||||
witnessUserName,
|
||||
checkTime,
|
||||
laboratoryName,loginName} = that.data;
|
||||
//数据效验
|
||||
if(projectId==""||loginName==""||deptId==""){
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkType==""){
|
||||
app.toast("请选择送检类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(materialName==""){
|
||||
app.toast("请填写材料名称!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(sampleNum==""){
|
||||
app.toast("请填写取样数量!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(usePosition==""){
|
||||
app.toast("请填写使用部位!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(qualifiedFlag==""){
|
||||
app.toast("请选择是否提供合格证!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(qualifiedFlag==""){
|
||||
app.toast("请选择是否提供合格证!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(witnessUser==""||witnessUserName==""){
|
||||
app.toast("请选择见证人!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkTime==""){
|
||||
app.toast("请选择送检时间!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(laboratoryName==""){
|
||||
app.toast("请填写送检实验室名称!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
let {
|
||||
projectId,
|
||||
deptId,
|
||||
checkType,
|
||||
|
@ -258,54 +204,209 @@ Page({
|
|||
qualifiedFlag,
|
||||
witnessUser,
|
||||
witnessUserName,
|
||||
checkTime:checkTime+":00",
|
||||
checkTime,
|
||||
laboratoryName,
|
||||
createBy:loginName
|
||||
loginName,
|
||||
trustDeed,
|
||||
attachment
|
||||
} = that.data;
|
||||
//数据效验
|
||||
if (projectId == "" || loginName == "" || deptId == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/add',
|
||||
method:"POST",
|
||||
data:params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
app.toast("添加成功!")
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
if (checkType == "") {
|
||||
app.toast("请选择送检类型!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (materialName == "") {
|
||||
app.toast("请填写材料名称!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (sampleNum == "") {
|
||||
app.toast("请填写取样数量!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (usePosition == "") {
|
||||
app.toast("请填写使用部位!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (qualifiedFlag == "") {
|
||||
app.toast("请选择是否提供合格证!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (qualifiedFlag == "") {
|
||||
app.toast("请选择是否提供合格证!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (witnessUser == "" || witnessUserName == "") {
|
||||
app.toast("请选择见证人!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (checkTime == "") {
|
||||
app.toast("请选择送检时间!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (laboratoryName == "") {
|
||||
app.toast("请填写送检实验室名称!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (trustDeed.length == 0) {
|
||||
app.toast("请上传检验委托单!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (attachment.length > 0) {
|
||||
for (let i = 0; i < attachment.length; i++) {
|
||||
let _fileType = attachment[i].path.split('.');
|
||||
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
let _files = [];
|
||||
trustDeed.forEach(item => {
|
||||
syncFileUpload(item).then(res => {
|
||||
if (res.code == 200) {
|
||||
let params = {
|
||||
projectId,
|
||||
deptId,
|
||||
checkType,
|
||||
materialName,
|
||||
usePosition,
|
||||
sampleNum,
|
||||
qualifiedFlag,
|
||||
witnessUser,
|
||||
witnessUserName,
|
||||
checkTime: checkTime,
|
||||
laboratoryName,
|
||||
createBy: loginName,
|
||||
trustDeed: res.fileName
|
||||
}
|
||||
if (attachment.length > 0) {
|
||||
attachment.forEach(file => {
|
||||
syncFileUpload(file.path).then(res => {
|
||||
_files.push(res.fileName);
|
||||
if (attachment.length == _files.length) {
|
||||
params.attachment = JSON.stringify(_files);
|
||||
this.submitForm(params);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.submitForm(params);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
* @param {*} params
|
||||
*/
|
||||
submitForm(params) {
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/add',
|
||||
method: "POST",
|
||||
data: params,
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res) {
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
app.toast("添加成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//选择检测类型
|
||||
onSelectCheckType(e){
|
||||
onSelectCheckType(e) {
|
||||
this.setData({
|
||||
checkType:e.detail.id
|
||||
checkType: e.detail.id
|
||||
})
|
||||
},
|
||||
//选择是否提供合格证
|
||||
onSelectQualifiedFlag(e){
|
||||
},
|
||||
//选择是否提供合格证
|
||||
onSelectQualifiedFlag(e) {
|
||||
this.setData({
|
||||
qualified:e.detail.id
|
||||
qualified: e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
// list 上传图片
|
||||
onImagesArr(e) {
|
||||
this.setData({
|
||||
trustDeed: e.detail
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 相关附件上传
|
||||
* @param {*} options
|
||||
*/
|
||||
otherFileUpload(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
attachment: file
|
||||
});
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
|
|
@ -1,130 +1,95 @@
|
|||
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">新增取样复试</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">新增取样复试</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">送检类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{checkTypeList}}" placeholder="请选择送检类型" bindchange="onSelectCheckType" ></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">材料名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
<voucher-select columns="{{checkTypeList}}" placeholder="请选择送检类型" bindchange="onSelectCheckType"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">取样数量</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">材料名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">使用部位</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写使用部位"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200"/>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">取样数量</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">是否提供合格证</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" bindchange="onSelectQualifiedFlag" ></voucher-select>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">使用部位</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写使用部位" placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">是否提供合格证</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" bindchange="onSelectQualifiedFlag"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">监理专员</view>
|
||||
<view class="inspect_info_content">
|
||||
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddSend" index="{{0}}" title="请选择监理专员">
|
||||
</select-group-person>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">送检时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-datetime counts="5" currentDate="{{currentDate}}" placeholder="请选择送检时间" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-datetime>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">送检时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" placeholder="请选择送检时间" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">送检实验室名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检验委托单</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" limit="{{1}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">送检实验室名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交送检</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交送检</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="/images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</van-overlay>
|
|
@ -2,333 +2,417 @@
|
|||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
loadShow:false,
|
||||
loginName:"",
|
||||
showDel:false,
|
||||
detectionImageList:[],
|
||||
minDetectionFileImages:[],
|
||||
detectionFiles:[],
|
||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
||||
detectionResult:"1",
|
||||
detectionFileData:[],
|
||||
fileType:["pdf","png","jpg","jpeg"],
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 2
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectDetection/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let imageUrls = [];
|
||||
let minImageUrls = [];
|
||||
let fileUrls = [];
|
||||
//判断附件
|
||||
if(res.data.detectionFile){
|
||||
res.data.detectionFile.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length-1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){
|
||||
imageUrls.push(that.data.request+element);
|
||||
minImageUrls.push(that.data.request+element+'.min.jpg');
|
||||
}else{
|
||||
fileUrls.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
detectionImageList:imageUrls,
|
||||
minDetectionFileImages:minImageUrls,
|
||||
detectionFiles:fileUrls,
|
||||
loadShow:false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if(res.data.createBy==that.data.loginName){
|
||||
that.setData({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//保存
|
||||
onSubmitSave(){
|
||||
this.setData({
|
||||
loadShow:true
|
||||
})
|
||||
let that = this
|
||||
let {id,detectionResult,detectionFileData,loginName} = that.data;
|
||||
//数据效验
|
||||
if(id==""||loginName==""){
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
// if(detectionResult==""){
|
||||
// app.toast("请选择检测结果!")
|
||||
// that.setData({
|
||||
// loadShow:false
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
if(detectionFileData.length==0){
|
||||
app.toast("请上传检测报告!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
detectionFileData.forEach(async (item)=>{
|
||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
||||
let uploadName = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
let obj = await that.syncUploadImage(uploadUrl,item.path,uploadName);
|
||||
let params = {
|
||||
id,
|
||||
checkState:"2",
|
||||
//detectionResult,
|
||||
detectionFile:obj.data.fileName,
|
||||
approveStatus:"1",
|
||||
updateBy:loginName
|
||||
}
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + "/wechat/projectDetection/edit",
|
||||
method:"POST",
|
||||
data:params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
app.toast("提交成功!")
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url,uploadFile,name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: { user: 'test' },
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: "",
|
||||
infoData: {},
|
||||
loadShow: false,
|
||||
loginName: "",
|
||||
showDel: false,
|
||||
detectionImageList: [],
|
||||
minDetectionFileImages: [],
|
||||
detectionFiles: [],
|
||||
list: [{
|
||||
id: 1,
|
||||
text: "合格"
|
||||
}, {
|
||||
id: 2,
|
||||
text: "不合格"
|
||||
}],
|
||||
detectionResult: "1",
|
||||
detectionFileData: [],
|
||||
fileType: ["pdf", "png", "jpg", "jpeg"],
|
||||
request: app.globalData.reqUrl,
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '检测报告'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 2,
|
||||
attachments: []
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
loginName: res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//取消页面
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let imageUrls = [];
|
||||
let minImageUrls = [];
|
||||
let fileUrls = [];
|
||||
//判断附件
|
||||
if (res.data.detectionFile) {
|
||||
res.data.detectionFile.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length - 1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if (_file == "PNG" || _file == "JPG" || _file == "JPEG") {
|
||||
imageUrls.push(that.data.request + element);
|
||||
minImageUrls.push(that.data.request + element + '.min.jpg');
|
||||
} else {
|
||||
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
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectDetection/remove',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
that.setData({
|
||||
infoData: res.data,
|
||||
attachments,
|
||||
detectionImageList: imageUrls,
|
||||
minDetectionFileImages: minImageUrls,
|
||||
detectionFiles: fileUrls,
|
||||
loadShow: false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if (res.data.createBy == that.data.loginName) {
|
||||
that.setData({
|
||||
showDel: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//保存
|
||||
onSubmitSave() {
|
||||
this.setData({
|
||||
loadShow: true
|
||||
})
|
||||
let that = this
|
||||
let {
|
||||
id,
|
||||
detectionResult,
|
||||
detectionFileData,
|
||||
loginName
|
||||
} = that.data;
|
||||
//数据效验
|
||||
if (id == "" || loginName == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
// if(detectionResult==""){
|
||||
// app.toast("请选择检测结果!")
|
||||
// that.setData({
|
||||
// loadShow:false
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
if (detectionFileData.length == 0) {
|
||||
app.toast("请上传检测报告!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
detectionFileData.forEach(async (item) => {
|
||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||
let uploadName = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
let obj = await that.syncUploadImage(uploadUrl, item.path, uploadName);
|
||||
let params = {
|
||||
id,
|
||||
checkState: "2",
|
||||
//detectionResult,
|
||||
detectionFile: obj.data.fileName,
|
||||
approveStatus: "1",
|
||||
updateBy: loginName
|
||||
}
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + "/wechat/projectDetection/edit",
|
||||
method: "POST",
|
||||
data: params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res) {
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
app.toast("提交成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url, uploadFile, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
onDelete() {
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/remove',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
method: "get",
|
||||
success(res) {
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//跳转修改页面
|
||||
onUpdate:function(){
|
||||
onUpdate: function () {
|
||||
let id = this.data.id;
|
||||
wx.redirectTo({
|
||||
url: `../edit/index?id=${id}`,
|
||||
})
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showImg:function(e){
|
||||
var that=this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
//展示图片
|
||||
showImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
//选择检测类型
|
||||
onSelect(e){
|
||||
this.setData({
|
||||
detectionResult:e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
fileUpload(options){
|
||||
let file=options.detail;
|
||||
this.setData({
|
||||
detectionFileData: file
|
||||
});
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
//展示图片
|
||||
showImg2: function (e) {
|
||||
if (this.data.infoData.trustDeed != null) {
|
||||
let imgs = this.data.infoData.trustDeed.split(',');
|
||||
let list = [];
|
||||
imgs.forEach(item => {
|
||||
list.push(this.data.request + item);
|
||||
})
|
||||
wx.previewImage({
|
||||
urls: list,
|
||||
current: imgs[e.currentTarget.dataset.index]
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//选择检测类型
|
||||
onSelect(e) {
|
||||
this.setData({
|
||||
detectionResult: e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
fileUpload(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
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 () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,4 +1,4 @@
|
|||
<!--pageage/safetyManagement/problemRectification/index.wxml-->
|
||||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
|
@ -70,6 +70,27 @@
|
|||
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.trustDeed!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">委托单</text></van-col>
|
||||
<view class="problem_list_info_con in-img-max">
|
||||
<view class="in-img-div" wx:for="{{format.split(infoData.trustDeed,',')}}" wx:key="index">
|
||||
<image bindtap='showImg2' data-index="{{index}}" src="{{request+item+'.min.jpg'}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
|
||||
<van-col span="18"></van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
|
||||
<view class="files_parent" wx:for="{{attachments}}" wx:key="index" bindtap="downFile" data-set="{{item}}">
|
||||
<text class="color_blue files">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
||||
|
|
|
@ -6,105 +6,128 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
maxDate:new Date(2088,1,1).getTime(),
|
||||
currentDate:new Date().getTime(),
|
||||
deptId:"",
|
||||
projectId:"",
|
||||
projectName:"",
|
||||
loginName:"",
|
||||
rectifierData:[],
|
||||
loadShow:false,
|
||||
checkTypeList:[],
|
||||
checkType:"1",
|
||||
materialName:"",
|
||||
usePosition:"",
|
||||
sampleNum:"",
|
||||
qualifiedFlag:"Y",
|
||||
witnessUser:"",
|
||||
witnessUserName:"",
|
||||
checkTime:"",
|
||||
laboratoryName:"",
|
||||
infoData:{},
|
||||
detectionFiles:"",
|
||||
fileUrls:"",
|
||||
fileUrlArray:[],
|
||||
activeName:"",
|
||||
flowRecordList:[],
|
||||
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
|
||||
detectionFileData:[],
|
||||
fileType:["pdf","png","jpg","jpeg"],
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 1
|
||||
id: "",
|
||||
maxDate: new Date(2088, 1, 1).getTime(),
|
||||
deptId: "",
|
||||
projectId: "",
|
||||
projectName: "",
|
||||
loginName: "",
|
||||
rectifierData: [],
|
||||
loadShow: false,
|
||||
checkTypeList: [],
|
||||
checkType: "1",
|
||||
materialName: "",
|
||||
usePosition: "",
|
||||
sampleNum: "",
|
||||
qualifiedFlag: "Y",
|
||||
witnessUser: "",
|
||||
witnessUserName: "",
|
||||
checkTime: "",
|
||||
laboratoryName: "",
|
||||
infoData: {},
|
||||
detectionFiles: "",
|
||||
fileUrls: "",
|
||||
fileUrlArray: [],
|
||||
activeName: "",
|
||||
flowRecordList: [],
|
||||
qualifiedFlagList: [{
|
||||
id: 'Y',
|
||||
text: "是"
|
||||
}, {
|
||||
id: 'N',
|
||||
text: "否"
|
||||
}],
|
||||
detectionFileData: [],
|
||||
fileType: ["pdf", "png", "jpg", "jpeg"],
|
||||
request: app.globalData.reqUrl,
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '检测报告'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 1,
|
||||
trustDeed: [],
|
||||
attachments: [],
|
||||
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
projectId:app.globalData.projectId,
|
||||
projectName:app.globalData.projectName,
|
||||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName,
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getTypeList();
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
projectId: app.globalData.projectId,
|
||||
projectName: app.globalData.projectName,
|
||||
deptId: res.data.deptId,
|
||||
loginName: res.data.loginName,
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getTypeList();
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询项目人员数据
|
||||
getProjectUserData(){
|
||||
getProjectUserData() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method:"get",
|
||||
data:{
|
||||
unitType:"4",
|
||||
projectId:that.data.projectId
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method: "get",
|
||||
data: {
|
||||
unitType: "4",
|
||||
projectId: that.data.projectId
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
rectifierData:res.data
|
||||
rectifierData: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getTypeList(){
|
||||
getTypeList() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectDetection/queryType',
|
||||
method:"get",
|
||||
data:{},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/queryType',
|
||||
method: "get",
|
||||
data: {},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let list=[];
|
||||
res.data.forEach(it =>{
|
||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
res.data.forEach(it => {
|
||||
list.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
checkTypeList:list
|
||||
checkTypeList: list
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -115,91 +138,117 @@ Page({
|
|||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectDetection/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let fileUrls = [];
|
||||
let fileNames = [];
|
||||
let fileUrlArray=[];
|
||||
//判断附件
|
||||
if(res.data.detectionFile){
|
||||
res.data.detectionFile.split(',').forEach(element => {
|
||||
let it = element.split('/');
|
||||
fileNames.push(it[it.length-1]);
|
||||
fileUrls.push(element);
|
||||
fileUrlArray.push({name:it[it.length-1],path:element});
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
detectionFiles:fileNames,
|
||||
fileUrlArray,
|
||||
fileUrls,
|
||||
detectionFileData:fileUrlArray,
|
||||
checkType:res.data.checkType,
|
||||
materialName:res.data.materialName,
|
||||
usePosition:res.data.usePosition,
|
||||
sampleNum:res.data.sampleNum,
|
||||
qualifiedFlag:res.data.qualifiedFlag,
|
||||
witnessUser:res.data.witnessUser,
|
||||
witnessUserName:res.data.witnessUserName,
|
||||
checkTime:res.data.checkTime,
|
||||
laboratoryName:res.data.laboratoryName,
|
||||
loadShow:false
|
||||
})
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let fileUrls = [];
|
||||
let fileNames = [];
|
||||
let fileUrlArray = [];
|
||||
//判断附件
|
||||
if (res.data.detectionFile) {
|
||||
res.data.detectionFile.split(',').forEach(element => {
|
||||
let it = element.split('/');
|
||||
fileNames.push(it[it.length - 1]);
|
||||
fileUrls.push(element);
|
||||
fileUrlArray.push({
|
||||
name: it[it.length - 1],
|
||||
path: element
|
||||
});
|
||||
});
|
||||
}
|
||||
let trustDeed = [];
|
||||
if (res.data.trustDeed != null) {
|
||||
res.data.trustDeed.split(',').forEach(item => {
|
||||
trustDeed.push(that.data.request + item + '.min.jpg');
|
||||
});
|
||||
}
|
||||
let attachments = [];
|
||||
if (res.data.attachment) {
|
||||
let files = JSON.parse(res.data.attachment);
|
||||
if (files && files.length > 0) {
|
||||
files.forEach(item => {
|
||||
let it = item.split('/');
|
||||
attachments.push({
|
||||
'name': it[it.length - 1],
|
||||
path: item
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
infoData: res.data,
|
||||
trustDeed,
|
||||
attachments,
|
||||
detectionFiles: fileNames,
|
||||
fileUrlArray,
|
||||
fileUrls,
|
||||
detectionFileData: fileUrlArray,
|
||||
checkType: res.data.checkType,
|
||||
materialName: res.data.materialName,
|
||||
usePosition: res.data.usePosition,
|
||||
sampleNum: res.data.sampleNum,
|
||||
qualifiedFlag: res.data.qualifiedFlag,
|
||||
witnessUser: res.data.witnessUser,
|
||||
witnessUserName: res.data.witnessUserName,
|
||||
checkTime: res.data.checkTime,
|
||||
laboratoryName: res.data.laboratoryName,
|
||||
loadShow: false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo(){
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method:"get",
|
||||
data:{
|
||||
fromType:"1",
|
||||
fromId:this.data.id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
that.setData({
|
||||
flowRecordList:res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getAuditinfo() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method: "get",
|
||||
data: {
|
||||
fromType: "1",
|
||||
fromId: this.data.id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
flowRecordList: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
fileUpload(options){
|
||||
let file=options.detail;
|
||||
this.setData({
|
||||
detectionFileData: file
|
||||
});
|
||||
},
|
||||
fileUpload(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
detectionFileData: file
|
||||
});
|
||||
},
|
||||
|
||||
// 手风琴
|
||||
onChange(event) {
|
||||
this.setData({
|
||||
activeName: event.detail,
|
||||
});
|
||||
},
|
||||
// 手风琴
|
||||
onChange(event) {
|
||||
this.setData({
|
||||
activeName: event.detail,
|
||||
});
|
||||
},
|
||||
|
||||
//材料名称
|
||||
onInputMaterialNameValue(e){
|
||||
onInputMaterialNameValue(e) {
|
||||
let materialName = e.detail.value
|
||||
this.setData({
|
||||
materialName
|
||||
|
@ -207,29 +256,29 @@ Page({
|
|||
},
|
||||
|
||||
//使用部位
|
||||
onInputUsePositionValue(e){
|
||||
onInputUsePositionValue(e) {
|
||||
let usePosition = e.detail.value
|
||||
this.setData({
|
||||
usePosition
|
||||
})
|
||||
},
|
||||
//取样数量
|
||||
onInputSampleNumValue(e){
|
||||
onInputSampleNumValue(e) {
|
||||
let sampleNum = e.detail.value
|
||||
this.setData({
|
||||
sampleNum
|
||||
})
|
||||
},
|
||||
//送检实验室名称
|
||||
onInputLaboratoryNameValue(e){
|
||||
onInputLaboratoryNameValue(e) {
|
||||
let laboratoryName = e.detail.value
|
||||
this.setData({
|
||||
laboratoryName
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//验收时间
|
||||
onInputTime(e){
|
||||
onInputTime(e) {
|
||||
let checkTime = e.detail
|
||||
this.setData({
|
||||
checkTime
|
||||
|
@ -237,241 +286,350 @@ Page({
|
|||
},
|
||||
|
||||
//添加监理专员
|
||||
onAddSend(e){
|
||||
if(e.detail.length>0){
|
||||
let phoneNumbers="";
|
||||
let userNames="";
|
||||
e.detail.forEach(it =>{
|
||||
phoneNumbers+=","+it.phoneNumber;
|
||||
userNames+=","+it.userName;
|
||||
onAddSend(e) {
|
||||
if (e.detail.length > 0) {
|
||||
let phoneNumbers = "";
|
||||
let userNames = "";
|
||||
e.detail.forEach(it => {
|
||||
phoneNumbers += "," + it.phoneNumber;
|
||||
userNames += "," + it.userName;
|
||||
});
|
||||
this.setData({
|
||||
witnessUserName:userNames.substring(1),
|
||||
witnessUser:phoneNumbers.substring(1)
|
||||
witnessUserName: userNames.substring(1),
|
||||
witnessUser: phoneNumbers.substring(1)
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.setData({
|
||||
witnessUser:"",
|
||||
witnessUserName:""
|
||||
witnessUser: "",
|
||||
witnessUserName: ""
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
//保存
|
||||
onSubmitSave(){
|
||||
onSubmitSave() {
|
||||
this.setData({
|
||||
loadShow:true
|
||||
loadShow: true
|
||||
})
|
||||
let that = this
|
||||
let {id,checkType,
|
||||
materialName,
|
||||
usePosition,
|
||||
sampleNum,
|
||||
qualifiedFlag,
|
||||
witnessUser,
|
||||
witnessUserName,
|
||||
checkTime,
|
||||
laboratoryName,loginName,detectionFileData} = that.data;
|
||||
let {
|
||||
id,
|
||||
checkType,
|
||||
materialName,
|
||||
usePosition,
|
||||
sampleNum,
|
||||
qualifiedFlag,
|
||||
witnessUser,
|
||||
witnessUserName,
|
||||
checkTime,
|
||||
laboratoryName,
|
||||
loginName,
|
||||
detectionFileData,
|
||||
trustDeed,
|
||||
attachments
|
||||
} = that.data;
|
||||
//数据效验
|
||||
if(id==""){
|
||||
if (id == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkType==""){
|
||||
if (checkType == "") {
|
||||
app.toast("请选择送检类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(materialName==""){
|
||||
if (materialName == "") {
|
||||
app.toast("请填写材料名称!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(sampleNum==""){
|
||||
if (sampleNum == "") {
|
||||
app.toast("请填写取样数量!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(usePosition==""){
|
||||
if (usePosition == "") {
|
||||
app.toast("请填写使用部位!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(qualifiedFlag==""){
|
||||
if (qualifiedFlag == "") {
|
||||
app.toast("请选择是否提供合格证!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(qualifiedFlag==""){
|
||||
if (qualifiedFlag == "") {
|
||||
app.toast("请选择是否提供合格证!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(witnessUser==""||witnessUserName==""){
|
||||
if (witnessUser == "" || witnessUserName == "") {
|
||||
app.toast("请选择见证人!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkTime==""){
|
||||
if (checkTime == "") {
|
||||
app.toast("请选择送检时间!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(laboratoryName==""){
|
||||
if (laboratoryName == "") {
|
||||
app.toast("请填写送检实验室名称!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.data.infoData.detectionFile!=null && detectionFileData.length==0){
|
||||
if (trustDeed.length == 0) {
|
||||
app.toast("请上传送检委托单!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (attachments.length > 0) {
|
||||
for (let i = 0; i < attachments.length; i++) {
|
||||
let _fileType = attachments[i].path.split('.');
|
||||
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.data.infoData.detectionFile != null && detectionFileData.length == 0) {
|
||||
app.toast("请上传检测报告!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
let path=this.data.infoData.detectionFile;
|
||||
if(detectionFileData.length>0){
|
||||
let path = "";
|
||||
if (detectionFileData.length > 0) {
|
||||
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){
|
||||
app.toast("检测报告不支持 [ "+_fileType+" ] 格式!")
|
||||
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||
app.toast("检测报告不支持 [ " + _fileType + " ] 格式!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
detectionFileData.push(null);
|
||||
}
|
||||
detectionFileData.forEach(async (item)=>{
|
||||
if(item!=null && item.path.indexOf("/profile/")==-1){
|
||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
||||
let uploadName = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
let obj = await that.syncUploadImage(uploadUrl,item.path,uploadName);
|
||||
path = obj.data.fileName;
|
||||
//检验委托单
|
||||
let trustDeedImages = [];
|
||||
//其它附件
|
||||
let attachmentFiles = [];
|
||||
//检测报告
|
||||
let detectionFiles = [];
|
||||
let params = {
|
||||
id,
|
||||
checkType,
|
||||
materialName,
|
||||
usePosition,
|
||||
sampleNum,
|
||||
qualifiedFlag,
|
||||
witnessUser,
|
||||
witnessUserName,
|
||||
checkTime: checkTime,
|
||||
laboratoryName,
|
||||
updateBy: loginName,
|
||||
approveStatus: that.data.approveStatus == null ? null : "1"
|
||||
}
|
||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload';
|
||||
let uploadName = "file";
|
||||
trustDeed.forEach(async (item) => {
|
||||
if (item.indexOf("/profile/") > -1) {
|
||||
trustDeedImages.push(item.replace(that.data.request, "").replace(".min.jpg", ""));
|
||||
} else {
|
||||
let obj = await that.syncUploadImage(uploadUrl, item, uploadName);
|
||||
trustDeedImages.push(obj.data.fileName)
|
||||
}
|
||||
let params = {
|
||||
id,
|
||||
checkType,
|
||||
materialName,
|
||||
usePosition,
|
||||
sampleNum,
|
||||
qualifiedFlag,
|
||||
witnessUser,
|
||||
witnessUserName,
|
||||
checkTime:checkTime+":00",
|
||||
laboratoryName,
|
||||
updateBy:loginName,
|
||||
detectionFile:path,
|
||||
approveStatus:path==null?null:"1"
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/edit',
|
||||
method:"POST",
|
||||
data:params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
app.toast("修改成功!")
|
||||
setTimeout(()=>{
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
* @param {*} params
|
||||
*/
|
||||
submitForm(params) {
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/edit',
|
||||
method: "POST",
|
||||
data: params,
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res) {
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
app.toast("修改成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
}
|
||||
}, 200)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url,uploadFile,name) {
|
||||
syncUploadImage(url, uploadFile, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: { user: 'test' },
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
//选择检测类型
|
||||
onSelectCheckType(e){
|
||||
onSelectCheckType(e) {
|
||||
this.setData({
|
||||
checkType:e.detail.id
|
||||
checkType: e.detail.id
|
||||
})
|
||||
},
|
||||
//选择是否提供合格证
|
||||
onSelectQualifiedFlag(e){
|
||||
},
|
||||
//选择是否提供合格证
|
||||
onSelectQualifiedFlag(e) {
|
||||
this.setData({
|
||||
qualified:e.detail.id
|
||||
qualified: e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
// list 上传图片
|
||||
onImagesArr(e) {
|
||||
this.setData({
|
||||
trustDeed: e.detail
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 相关附件上传
|
||||
* @param {*} options
|
||||
*/
|
||||
otherFileUpload(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
attachments: file
|
||||
});
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
|
|
@ -1,122 +1,143 @@
|
|||
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">修改取样复试</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">修改取样复试</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
</view>
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
|
||||
{{item.commentResult}}
|
||||
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
</view>
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
|
||||
{{item.commentResult}}
|
||||
<text wx:if="{{item.commentResult==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.commentResult==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}">
|
||||
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.deptName}}">
|
||||
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.comment}}">
|
||||
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}"><image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text></view>
|
||||
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view>
|
||||
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view>
|
||||
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">送检类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{checkTypeList}}" selectValue="{{infoData.checkType}}" placeholder="请选择送检类型" bindchange="onSelectCheckType" ></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">材料名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" model:value="{{infoData.materialName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
<voucher-select columns="{{checkTypeList}}" selectValue="{{infoData.checkType}}" placeholder="请选择送检类型" bindchange="onSelectCheckType"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">取样数量</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" model:value="{{infoData.sampleNum}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">材料名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写材料名称" bindinput="onInputMaterialNameValue" model:value="{{infoData.materialName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">使用部位</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写使用部位" model:value="{{infoData.usePosition}}"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200"/>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">取样数量</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写取样数量" bindinput="onInputSampleNumValue" model:value="{{infoData.sampleNum}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">是否提供合格证</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" selectValue="{{infoData.qualifiedFlag}}" bindchange="onSelectQualifiedFlag" ></voucher-select>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">使用部位</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写使用部位" model:value="{{infoData.usePosition}}" placeholder-style="color:#6777aa;" bindinput="onInputUsePositionValue" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">是否提供合格证</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{qualifiedFlagList}}" placeholder="请选择是否提供合格证" selectValue="{{infoData.qualifiedFlag}}" bindchange="onSelectQualifiedFlag"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">监理专员</view>
|
||||
<view class="inspect_info_content">
|
||||
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddSend" index="{{0}}" title="请选择监理专员" choose="{{infoData.witnessUserName}}">
|
||||
</select-group-person>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">送检时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-datetime counts="5" currentDate="{{currentDate}}" placeholder="请选择送检时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkTime}}"></voucher-datetime>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">送检时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" placeholder="请选择送检时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkTime}}"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">送检实验室名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" model:value="{{infoData.laboratoryName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检验委托单</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" limit="{{1}}" fileUrlArray="{{trustDeed}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}" fileUrlArray="{{attachments}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">送检实验室名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写实验室名称" bindinput="onInputLaboratoryNameValue" model:value="{{infoData.laboratoryName}}" placeholder-style="color:#6777aa;" maxlength="100" class="inspect_input_fill_in" />
|
||||
<view class="inspect_overview" wx:if="{{infoData.detectionFile!=nulll}}">
|
||||
<view class="safety_inspect_title module_title_flex module_title_padding">
|
||||
<view>登记取样复试结果</view>
|
||||
</view>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检测报告
|
||||
<text style="font-size: small;">[可上传PDF和图片格式]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{1}}" fileUrlArray="{{fileUrlArray}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview" wx:if="{{infoData.detectionFile!=nulll}}">
|
||||
<view class="safety_inspect_title module_title_flex module_title_padding">
|
||||
<view>登记取样复试结果</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交</view>
|
||||
</view>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">检测报告
|
||||
<text style="font-size: small;">[可上传PDF和图片格式]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{1}}" fileUrlArray="{{fileUrlArray}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-overlay show="{{loadShow}}">
|
||||
|
@ -124,52 +145,4 @@
|
|||
<image src="/images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</van-overlay>
|
|
@ -29,7 +29,8 @@ Page({
|
|||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 100
|
||||
active: 100,
|
||||
attachments:[],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -74,7 +75,7 @@ Page({
|
|||
let state = that.data.active;
|
||||
if (res.data.approveStatus == null) {
|
||||
state = 2;
|
||||
}else if (res.data.approveStatus == "1") {
|
||||
} else if (res.data.approveStatus == "1") {
|
||||
state = 3;
|
||||
} else if (res.data.approveStatus == "3") {
|
||||
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({
|
||||
infoData: res.data,
|
||||
attachments,
|
||||
detectionImageList: imageUrls,
|
||||
minDetectionFileImages: minImageUrls,
|
||||
detectionFiles: fileNames,
|
||||
|
@ -227,6 +242,46 @@ Page({
|
|||
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showImg2: function (e) {
|
||||
if (this.data.infoData.trustDeed != null) {
|
||||
let imgs = this.data.infoData.trustDeed.split(',');
|
||||
let list = [];
|
||||
imgs.forEach(item => {
|
||||
list.push(this.data.request + item);
|
||||
})
|
||||
wx.previewImage({
|
||||
urls: list,
|
||||
current: imgs[e.currentTarget.dataset.index]
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载附件
|
||||
* @param {*} e
|
||||
*/
|
||||
downFile2: function (e) {
|
||||
let {
|
||||
path,
|
||||
} = e.currentTarget.dataset.set
|
||||
wx.downloadFile({
|
||||
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
|
|
|
@ -1,125 +1,156 @@
|
|||
<!--pageage/safetyManagement/problemRectification/index.wxml-->
|
||||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">取样复试详情</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">取样复试详情</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
|
||||
<text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交取样复试</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批取样复试</text>
|
||||
<text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}">
|
||||
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.deptName}}">
|
||||
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.comment}}">
|
||||
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}"><image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text></view>
|
||||
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view>
|
||||
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view>
|
||||
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_blue">送检类型</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.checkTypeName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_orange">材料名称</text></van-col>
|
||||
<van-col span="18" class="color_orange">{{infoData.materialName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">取样数量</text></van-col>
|
||||
<van-col span="18">{{infoData.sampleNum}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">使用部位</text></van-col>
|
||||
<van-col span="18">{{infoData.usePosition}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">合格证</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.qualifiedFlag=='Y'}}" class="color_green">已提供</text>
|
||||
<text wx:else>未提供</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">见证人</text></van-col>
|
||||
<van-col span="18">{{infoData.witnessUserName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">送检时间</text></van-col>
|
||||
<van-col span="18">{{infoData.checkTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">实验室</text></van-col>
|
||||
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.trustDeed!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">委托单</text></van-col>
|
||||
<view class="problem_list_info_con in-img-max">
|
||||
<view class="in-img-div" wx:for="{{format.split(infoData.trustDeed,',')}}" wx:key="index">
|
||||
<image bindtap='showImg2' data-index="{{index}}" src="{{request+item+'.min.jpg'}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
|
||||
<van-col span="18"></van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
|
||||
<view class="files_parent" wx:for="{{attachments}}" wx:key="index" bindtap="downFile2" data-set="{{item}}">
|
||||
<text class="color_blue files">{{item.name}}</text>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_blue">送检类型</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.checkTypeName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_orange">材料名称</text></van-col>
|
||||
<van-col span="18" class="color_orange">{{infoData.materialName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">取样数量</text></van-col>
|
||||
<van-col span="18">{{infoData.sampleNum}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">使用部位</text></van-col>
|
||||
<van-col span="18">{{infoData.usePosition}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">合格证</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.qualifiedFlag=='Y'}}" class="color_green">已提供</text>
|
||||
<text wx:else>未提供</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">见证人</text></van-col>
|
||||
<van-col span="18">{{infoData.witnessUserName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">送检时间</text></van-col>
|
||||
<van-col span="18">{{infoData.checkTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">实验室</text></van-col>
|
||||
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
||||
<van-col span="18">{{infoData.deptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
|
||||
<van-col span="18">{{infoData.createBy}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交时间</text></van-col>
|
||||
<van-col span="18">{{infoData.createTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
||||
<van-col span="18">{{infoData.deptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
|
||||
<van-col span="18">{{infoData.createBy}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交时间</text></van-col>
|
||||
<van-col span="18">{{infoData.createTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview" wx:if="{{infoData.checkState==2}}">
|
||||
<view class="safety_inspect_title module_title_flex module_title_padding">
|
||||
<view>检测报告登记结果</view>
|
||||
|
@ -141,13 +172,13 @@
|
|||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">检测报告</text></van-col>
|
||||
<van-col span="18">
|
||||
<view class="in-img-div" wx:if="{{minDetectionFileImages.length>0}}" wx:for="{{minDetectionFileImages}}" wx:key="index">
|
||||
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
|
||||
</view>
|
||||
<view class="in-img-div" wx:if="{{detectionFiles.length>0}}">
|
||||
<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>
|
||||
</view>
|
||||
<view class="in-img-div" wx:if="{{minDetectionFileImages.length>0}}" wx:for="{{minDetectionFileImages}}" wx:key="index">
|
||||
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
|
||||
</view>
|
||||
<view class="in-img-div" wx:if="{{detectionFiles.length>0}}">
|
||||
<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>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
|
@ -155,18 +186,17 @@
|
|||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">检测结果</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.approveStatus==null}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">送检中</text>
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_yellow" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审核</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==null}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">送检中</text>
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_yellow" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审核</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to" wx:if="{{showDel}}">
|
||||
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="problem_submit_to" wx:if="{{showDel}}">
|
||||
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
|
||||
</view>
|
||||
</view>
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/securityCheckGR/index.js
|
||||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -58,6 +60,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/login/index',
|
||||
})
|
||||
}
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
|
@ -87,12 +94,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
||||
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/addSafetyInspect/index.js
|
||||
import {
|
||||
syncFileUpload
|
||||
} from '../../../utils/request'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -6,98 +8,117 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
maxDate:new Date(2088,1,1).getTime(),
|
||||
currentDate:new Date().getTime(),
|
||||
deptId:"",
|
||||
projectId:"",
|
||||
projectName:"",
|
||||
loginName:"",
|
||||
userName:"",
|
||||
rectifierData:[],
|
||||
rectifierData2:[],
|
||||
imageInfoData:[],
|
||||
checkingResult:"1",
|
||||
maxDate: new Date(2088, 1, 1).getTime(),
|
||||
minDate: new Date(2001, 1, 1).getTime(),
|
||||
deptId: "",
|
||||
projectId: "",
|
||||
projectName: "",
|
||||
loginName: "",
|
||||
userName: "",
|
||||
rectifierData: [],
|
||||
rectifierData2: [],
|
||||
imageInfoData: [],
|
||||
checkingResult: "1",
|
||||
//验收时间
|
||||
checkTime:'',
|
||||
loadShow:false,
|
||||
qualityUser:"",
|
||||
qualityUserName:"",
|
||||
superviseUser:"",
|
||||
superviseUserName:"",
|
||||
checkWorkingPosition:"",
|
||||
intro:"",
|
||||
dataTypeLvl1:"1",
|
||||
dataTypeLvl2:"",
|
||||
dataTypeLvl1List:[],
|
||||
dataTypeLvl2List:[],
|
||||
dataTypeLvl2AllList:[],
|
||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 0
|
||||
checkTime: '',
|
||||
loadShow: false,
|
||||
qualityUser: "",
|
||||
qualityUserName: "",
|
||||
superviseUser: "",
|
||||
superviseUserName: "",
|
||||
checkWorkingPosition: "",
|
||||
intro: "",
|
||||
dataTypeLvl1: "1",
|
||||
dataTypeLvl2: "",
|
||||
dataTypeLvl1List: [],
|
||||
dataTypeLvl2List: [],
|
||||
dataTypeLvl2AllList: [],
|
||||
list: [{
|
||||
id: 1,
|
||||
text: "合格"
|
||||
}, {
|
||||
id: 2,
|
||||
text: "不合格"
|
||||
}],
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 0,
|
||||
checkingFiles: "",
|
||||
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {projectId,projectName} = options
|
||||
let {
|
||||
projectId,
|
||||
projectName
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
projectId,
|
||||
projectName,
|
||||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.nickName
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getDataTypeLvlList();
|
||||
}
|
||||
})
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
projectId,
|
||||
projectName,
|
||||
deptId: res.data.deptId,
|
||||
loginName: res.data.loginName,
|
||||
userName: res.data.nickName
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getDataTypeLvlList();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询项目人员数据
|
||||
getProjectUserData(){
|
||||
getProjectUserData() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method:"get",
|
||||
data:{
|
||||
unitType:"4",
|
||||
projectId:that.data.projectId
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method: "get",
|
||||
data: {
|
||||
unitType: "4",
|
||||
projectId: that.data.projectId
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
let tempData = []
|
||||
that.setData({
|
||||
rectifierData:res.data,
|
||||
rectifierData: res.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method:"get",
|
||||
data:{
|
||||
unitType:"2",
|
||||
projectId:that.data.projectId
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method: "get",
|
||||
data: {
|
||||
unitType: "2",
|
||||
projectId: that.data.projectId
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
let tempData = []
|
||||
that.setData({
|
||||
rectifierData2:res.data,
|
||||
rectifierData2: res.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -105,53 +126,59 @@ Page({
|
|||
},
|
||||
|
||||
//查询验收类型数据
|
||||
getDataTypeLvlList(){
|
||||
getDataTypeLvlList() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
||||
method:"get",
|
||||
data:{
|
||||
type:"project_checking_data_type_lvl1"
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||
method: "get",
|
||||
data: {
|
||||
type: "project_checking_data_type_lvl1"
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let list=[];
|
||||
res.data.forEach(it =>{
|
||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
res.data.forEach(it => {
|
||||
list.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
dataTypeLvl1List:list,
|
||||
dataTypeLvl1List: list,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
||||
method:"get",
|
||||
data:{
|
||||
type:"project_checking_data_type_lvl2"
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||
method: "get",
|
||||
data: {
|
||||
type: "project_checking_data_type_lvl2"
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
let tempData = []
|
||||
res.data.forEach(it =>{
|
||||
if(it.remark=="1"){
|
||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
res.data.forEach(it => {
|
||||
if (it.remark == "1") {
|
||||
tempData.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
}
|
||||
})
|
||||
that.setData({
|
||||
dataTypeLvl2List:tempData,
|
||||
dataTypeLvl2AllList:res.data,
|
||||
dataTypeLvl2:tempData[0].id,
|
||||
dataTypeLvl2List: tempData,
|
||||
dataTypeLvl2AllList: res.data,
|
||||
dataTypeLvl2: tempData[0].id,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -159,42 +186,45 @@ Page({
|
|||
},
|
||||
|
||||
//切换验收结果
|
||||
onSelectType(e){
|
||||
onSelectType(e) {
|
||||
this.setData({
|
||||
checkingResult:e.detail.id
|
||||
checkingResult: e.detail.id
|
||||
})
|
||||
},
|
||||
//验收类型
|
||||
onSelectTypeLvl1(e){
|
||||
onSelectTypeLvl1(e) {
|
||||
this.setData({
|
||||
dataTypeLvl1:e.detail.id
|
||||
dataTypeLvl1: e.detail.id
|
||||
})
|
||||
let tempData = []
|
||||
this.data.dataTypeLvl2AllList.forEach(it =>{
|
||||
if(it.remark==e.detail.id){
|
||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
this.data.dataTypeLvl2AllList.forEach(it => {
|
||||
if (it.remark == e.detail.id) {
|
||||
tempData.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
dataTypeLvl2List:tempData,
|
||||
dataTypeLvl2:tempData[0].id,
|
||||
dataTypeLvl2List: tempData,
|
||||
dataTypeLvl2: tempData[0].id,
|
||||
})
|
||||
},
|
||||
},
|
||||
//类型分类
|
||||
onSelectTypeLvl2(e){
|
||||
onSelectTypeLvl2(e) {
|
||||
this.setData({
|
||||
dataTypeLvl2:e.detail.id
|
||||
dataTypeLvl2: e.detail.id
|
||||
})
|
||||
},
|
||||
},
|
||||
//工序部位
|
||||
onInputCheckWorkingPositionValue(e){
|
||||
onInputCheckWorkingPositionValue(e) {
|
||||
let checkWorkingPosition = e.detail.value
|
||||
this.setData({
|
||||
checkWorkingPosition
|
||||
})
|
||||
},
|
||||
//验收描述
|
||||
onInputIntroValue(e){
|
||||
onInputIntroValue(e) {
|
||||
let intro = e.detail.value
|
||||
this.setData({
|
||||
intro
|
||||
|
@ -202,7 +232,7 @@ Page({
|
|||
},
|
||||
|
||||
//验收时间
|
||||
onInputTime(e){
|
||||
onInputTime(e) {
|
||||
let checkTime = e.detail
|
||||
this.setData({
|
||||
checkTime
|
||||
|
@ -210,107 +240,124 @@ Page({
|
|||
},
|
||||
|
||||
// list 上传图片
|
||||
onImagesArr(e){
|
||||
onImagesArr(e) {
|
||||
var data = this.data.imageInfoData
|
||||
data = e.detail
|
||||
this.setData({
|
||||
imageInfoData:data
|
||||
imageInfoData: data
|
||||
})
|
||||
},
|
||||
|
||||
//添加质量专员
|
||||
onAddQualityUser(e){
|
||||
if(e.detail.length>0){
|
||||
onAddQualityUser(e) {
|
||||
if (e.detail.length > 0) {
|
||||
this.setData({
|
||||
qualityUser:e.detail[0].phoneNumber,
|
||||
qualityUserName:e.detail[0].userName
|
||||
qualityUser: e.detail[0].phoneNumber,
|
||||
qualityUserName: e.detail[0].userName
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//添加监理专员
|
||||
onAddSuperviseUser(e){
|
||||
if(e.detail.length>0){
|
||||
onAddSuperviseUser(e) {
|
||||
if (e.detail.length > 0) {
|
||||
this.setData({
|
||||
superviseUser:e.detail[0].phoneNumber,
|
||||
superviseUserName:e.detail[0].userName
|
||||
superviseUser: e.detail[0].phoneNumber,
|
||||
superviseUserName: e.detail[0].userName
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
//保存
|
||||
onProblemSubmitSave(){
|
||||
onProblemSubmitSave() {
|
||||
this.setData({
|
||||
loadShow:true
|
||||
loadShow: true
|
||||
})
|
||||
let that = this
|
||||
let {projectId,deptId,qualityUser,qualityUserName,superviseUser,superviseUserName,checkWorkingPosition,intro,checkTime,checkingResult,imageInfoData,loginName,userName,dataTypeLvl1,dataTypeLvl2} = that.data;
|
||||
let {
|
||||
projectId,
|
||||
deptId,
|
||||
qualityUser,
|
||||
qualityUserName,
|
||||
superviseUser,
|
||||
superviseUserName,
|
||||
checkWorkingPosition,
|
||||
intro,
|
||||
checkTime,
|
||||
checkingResult,
|
||||
imageInfoData,
|
||||
loginName,
|
||||
userName,
|
||||
dataTypeLvl1,
|
||||
dataTypeLvl2,
|
||||
checkingFiles
|
||||
} = that.data;
|
||||
//数据效验
|
||||
if(projectId==""||deptId==""||loginName==""){
|
||||
if (projectId == "" || deptId == "" || loginName == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(imageInfoData.length==0){
|
||||
if (imageInfoData.length == 0) {
|
||||
app.toast("请上传举牌验收现场图片!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(dataTypeLvl1==""){
|
||||
if (dataTypeLvl1 == "") {
|
||||
app.toast("请选择验收类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(dataTypeLvl2==""){
|
||||
if (dataTypeLvl2 == "") {
|
||||
app.toast("请选择类型分类!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(qualityUser==""||qualityUserName==""){
|
||||
if (qualityUser == "" || qualityUserName == "") {
|
||||
app.toast("请选择质量专员!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(superviseUser==""||superviseUserName==""){
|
||||
if (superviseUser == "" || superviseUserName == "") {
|
||||
app.toast("请选择监理专员!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkWorkingPosition==""){
|
||||
if (checkWorkingPosition == "") {
|
||||
app.toast("请填写验收工序部位!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(intro==""){
|
||||
if (intro == "") {
|
||||
app.toast("请填写验收结果描述!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkTime==""){
|
||||
if (checkTime == "") {
|
||||
app.toast("请选择验收时间!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
@ -321,100 +368,148 @@ Page({
|
|||
// })
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (checkingFiles.length > 0) {
|
||||
for (let i = 0; i < checkingFiles.length; i++) {
|
||||
let _fileType = checkingFiles[i].path.split('.');
|
||||
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if (this.data.fileType.indexOf(_fileType) == -1) {
|
||||
app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
|
||||
that.setData({
|
||||
loadShow: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
let fileUrls = [];
|
||||
imageInfoData.forEach(async (item)=>{
|
||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
||||
let name = "file"
|
||||
let _checkingFiles = [];
|
||||
imageInfoData.forEach(async (item) => {
|
||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||
let name = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
||||
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||
fileUrls.push(obj.data.fileName);
|
||||
//验证图片上传完毕
|
||||
if(fileUrls.length == imageInfoData.length){
|
||||
if (fileUrls.length == imageInfoData.length) {
|
||||
let params = {
|
||||
projectId,
|
||||
deptId:deptId,
|
||||
deptId: deptId,
|
||||
qualityUser,
|
||||
qualityUserName,
|
||||
superviseUser,
|
||||
superviseUserName,
|
||||
checkWorkingPosition,
|
||||
intro,
|
||||
checkingDate:checkTime,
|
||||
checkingDate: checkTime,
|
||||
//checkResult:checkingResult,
|
||||
approveStatus:"1",
|
||||
createBy:loginName,
|
||||
imageUrls:fileUrls.toString(),
|
||||
approveStatus: "1",
|
||||
createBy: loginName,
|
||||
imageUrls: fileUrls.toString(),
|
||||
dataTypeLvl1,
|
||||
dataTypeLvl2,
|
||||
dataTypeLvl2
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/add',
|
||||
method:"POST",
|
||||
data:params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
res =res.data
|
||||
if(res.code == 200){
|
||||
app.toast("添加成功!")
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
}
|
||||
if (checkingFiles.length > 0) {
|
||||
for (let i = 0; i < checkingFiles.length; i++) {
|
||||
syncFileUpload(checkingFiles[i].path).then(res => {
|
||||
_checkingFiles.push(res.fileName);
|
||||
if (checkingFiles.length == _checkingFiles.length) {
|
||||
params.checkingFiles = JSON.stringify(_checkingFiles);
|
||||
this.submitForm(params);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.submitForm(params);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
* @param {*} params
|
||||
*/
|
||||
submitForm(params) {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/add',
|
||||
method: "POST",
|
||||
data: params,
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res) {
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
app.toast("添加成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url,uploadFile,name) {
|
||||
syncUploadImage(url, uploadFile, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: { user: 'test' },
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 相关附件上传
|
||||
* @param {*} options
|
||||
*/
|
||||
otherFileUpload(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
checkingFiles: file
|
||||
});
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
|
||||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -65,9 +65,16 @@
|
|||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">验收时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-datetime counts="5" currentDate="{{currentDate}}" placeholder="请选择验收时间" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-datetime>
|
||||
<voucher-date counts="5" placeholder="请选择验收时间" minDate="{{minDate}}" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="inspect_info_list" wx:if="{{false}}">
|
||||
<view class="inspect_info_title">验收结果</view>
|
||||
<view class="inspect_info_content">
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/addSafetyInspect/index.js
|
||||
import {
|
||||
syncFileUpload
|
||||
} from '../../../utils/request'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -6,106 +8,126 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
maxDate:new Date(2088,1,1).getTime(),
|
||||
currentDate:new Date().getTime(),
|
||||
deptId:"",
|
||||
projectId:"",
|
||||
projectName:"",
|
||||
loginName:"",
|
||||
userName:"",
|
||||
rectifierData:[],
|
||||
rectifierData2:[],
|
||||
imageInfoData:[],
|
||||
checkingResult:"1",
|
||||
maxDate: new Date(2088, 1, 1).getTime(),
|
||||
deptId: "",
|
||||
projectId: "",
|
||||
projectName: "",
|
||||
loginName: "",
|
||||
userName: "",
|
||||
rectifierData: [],
|
||||
rectifierData2: [],
|
||||
imageInfoData: [],
|
||||
checkingResult: "1",
|
||||
//验收时间
|
||||
checkTime:'',
|
||||
loadShow:false,
|
||||
qualityUser:"",
|
||||
qualityUserName:"",
|
||||
superviseUser:"",
|
||||
superviseUserName:"",
|
||||
checkWorkingPosition:"",
|
||||
intro:"",
|
||||
infoData:{},
|
||||
activeName:"",
|
||||
flowRecordList:[],
|
||||
minUrls:[],
|
||||
dataTypeLvl1:"",
|
||||
dataTypeLvl2:"",
|
||||
dataTypeLvl1List:[],
|
||||
dataTypeLvl2List:[],
|
||||
dataTypeLvl2AllList:[],
|
||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 1
|
||||
checkTime: '',
|
||||
loadShow: false,
|
||||
qualityUser: "",
|
||||
qualityUserName: "",
|
||||
superviseUser: "",
|
||||
superviseUserName: "",
|
||||
checkWorkingPosition: "",
|
||||
intro: "",
|
||||
infoData: {},
|
||||
activeName: "",
|
||||
flowRecordList: [],
|
||||
minUrls: [],
|
||||
dataTypeLvl1: "",
|
||||
dataTypeLvl2: "",
|
||||
dataTypeLvl1List: [],
|
||||
dataTypeLvl2List: [],
|
||||
dataTypeLvl2AllList: [],
|
||||
list: [{
|
||||
id: 1,
|
||||
text: "合格"
|
||||
}, {
|
||||
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) {
|
||||
let {id,dt1} = options
|
||||
let {
|
||||
id,
|
||||
dt1
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,dt1,
|
||||
projectId:app.globalData.projectId,
|
||||
projectName:app.globalData.projectName,
|
||||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.nickName
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getDataTypeLvlList();
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
dt1,
|
||||
projectId: app.globalData.projectId,
|
||||
projectName: app.globalData.projectName,
|
||||
deptId: res.data.deptId,
|
||||
loginName: res.data.loginName,
|
||||
userName: res.data.nickName
|
||||
})
|
||||
this.getProjectUserData();
|
||||
this.getDataTypeLvlList();
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询项目人员数据
|
||||
getProjectUserData(){
|
||||
getProjectUserData() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method:"get",
|
||||
data:{
|
||||
unitType:"4",
|
||||
projectId:that.data.projectId
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method: "get",
|
||||
data: {
|
||||
unitType: "4",
|
||||
projectId: that.data.projectId
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
let tempData = []
|
||||
that.setData({
|
||||
rectifierData:res.data,
|
||||
rectifierData: res.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method:"get",
|
||||
data:{
|
||||
unitType:"2",
|
||||
projectId:that.data.projectId
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
||||
method: "get",
|
||||
data: {
|
||||
unitType: "2",
|
||||
projectId: that.data.projectId
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
let tempData = []
|
||||
that.setData({
|
||||
rectifierData2:res.data,
|
||||
rectifierData2: res.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -113,53 +135,59 @@ Page({
|
|||
},
|
||||
|
||||
//查询验收类型数据
|
||||
getDataTypeLvlList(){
|
||||
getDataTypeLvlList() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
||||
method:"get",
|
||||
data:{
|
||||
type:"project_checking_data_type_lvl1"
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||
method: "get",
|
||||
data: {
|
||||
type: "project_checking_data_type_lvl1"
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let list=[];
|
||||
res.data.forEach(it =>{
|
||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
res.data.forEach(it => {
|
||||
list.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
dataTypeLvl1List:list,
|
||||
dataTypeLvl1List: list,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectchecking/queryDictType',
|
||||
method:"get",
|
||||
data:{
|
||||
type:"project_checking_data_type_lvl2"
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/queryDictType',
|
||||
method: "get",
|
||||
data: {
|
||||
type: "project_checking_data_type_lvl2"
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
let tempData = []
|
||||
res.data.forEach(it =>{
|
||||
console.log(that.data.dt1,"xxxxxxxxxxxxxxxx");
|
||||
if(it.remark==that.data.dt1){
|
||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
res.data.forEach(it => {
|
||||
console.log(that.data.dt1, "xxxxxxxxxxxxxxxx");
|
||||
if (it.remark == that.data.dt1) {
|
||||
tempData.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
}
|
||||
})
|
||||
that.setData({
|
||||
dataTypeLvl2List:tempData,
|
||||
dataTypeLvl2AllList:res.data
|
||||
dataTypeLvl2List: tempData,
|
||||
dataTypeLvl2AllList: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -167,44 +195,47 @@ Page({
|
|||
},
|
||||
|
||||
//切换验收结果
|
||||
onSelectType(e){
|
||||
onSelectType(e) {
|
||||
this.setData({
|
||||
checkingResult:e.detail.id
|
||||
checkingResult: e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
//验收类型
|
||||
onSelectTypeLvl1(e){
|
||||
onSelectTypeLvl1(e) {
|
||||
this.setData({
|
||||
dataTypeLvl1:e.detail.id
|
||||
dataTypeLvl1: e.detail.id
|
||||
})
|
||||
let tempData = []
|
||||
this.data.dataTypeLvl2AllList.forEach(it =>{
|
||||
if(it.remark==e.detail.id){
|
||||
tempData.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
this.data.dataTypeLvl2AllList.forEach(it => {
|
||||
if (it.remark == e.detail.id) {
|
||||
tempData.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
dataTypeLvl2List:tempData,
|
||||
dataTypeLvl2:tempData[0].id,
|
||||
dataTypeLvl2List: tempData,
|
||||
dataTypeLvl2: tempData[0].id,
|
||||
})
|
||||
},
|
||||
},
|
||||
//类型分类
|
||||
onSelectTypeLvl2(e){
|
||||
onSelectTypeLvl2(e) {
|
||||
this.setData({
|
||||
dataTypeLvl2:e.detail.id
|
||||
dataTypeLvl2: e.detail.id
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
//工序部位
|
||||
onInputCheckWorkingPositionValue(e){
|
||||
onInputCheckWorkingPositionValue(e) {
|
||||
let checkWorkingPosition = e.detail.value
|
||||
this.setData({
|
||||
checkWorkingPosition
|
||||
})
|
||||
},
|
||||
//验收描述
|
||||
onInputIntroValue(e){
|
||||
onInputIntroValue(e) {
|
||||
let intro = e.detail.value
|
||||
this.setData({
|
||||
intro
|
||||
|
@ -212,203 +243,247 @@ Page({
|
|||
},
|
||||
|
||||
//验收时间
|
||||
onInputTime(e){
|
||||
onInputTime(e) {
|
||||
let checkTime = e.detail
|
||||
this.setData({
|
||||
checkTime
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectchecking/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let imageInfoData = [];
|
||||
if(res.data.imageUrls){
|
||||
res.data.imageUrls.split(',').forEach(element => {
|
||||
imageInfoData.push(that.data.request+element+'.min.jpg');
|
||||
});
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let imageInfoData = [];
|
||||
if (res.data.imageUrls) {
|
||||
res.data.imageUrls.split(',').forEach(element => {
|
||||
imageInfoData.push(that.data.request + element + '.min.jpg');
|
||||
});
|
||||
}
|
||||
let checkingFiles = [];
|
||||
if (res.data.checkingFiles) {
|
||||
let files = JSON.parse(res.data.checkingFiles);
|
||||
if (files && files.length > 0) {
|
||||
files.forEach(item => {
|
||||
let it = item.split('/');
|
||||
checkingFiles.push({
|
||||
'name': it[it.length - 1],
|
||||
path: item
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
infoData: res.data,
|
||||
fileUrlArray: checkingFiles,
|
||||
dataTypeLvl1: res.data.dataTypeLvl1,
|
||||
dataTypeLvl2: res.data.dataTypeLvl2,
|
||||
qualityUser: res.data.qualityUser,
|
||||
qualityUserName: res.data.qualityUserName,
|
||||
superviseUser: res.data.superviseUser,
|
||||
superviseUserName: res.data.superviseUserName,
|
||||
checkWorkingPosition: res.data.checkWorkingPosition,
|
||||
intro: res.data.intro,
|
||||
checkTime: res.data.checkTime,
|
||||
imageInfoData,
|
||||
loadShow: false
|
||||
})
|
||||
}
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
dataTypeLvl1:res.data.dataTypeLvl1,
|
||||
dataTypeLvl2:res.data.dataTypeLvl2,
|
||||
qualityUser:res.data.qualityUser,
|
||||
qualityUserName:res.data.qualityUserName,
|
||||
superviseUser:res.data.superviseUser,
|
||||
superviseUserName:res.data.superviseUserName,
|
||||
checkWorkingPosition:res.data.checkWorkingPosition,
|
||||
intro:res.data.intro,
|
||||
checkTime:res.data.checkTime,
|
||||
imageInfoData,
|
||||
loadShow:false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo(){
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method:"get",
|
||||
data:{
|
||||
fromType:"3",
|
||||
fromId:this.data.id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
that.setData({
|
||||
flowRecordList:res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getAuditinfo() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method: "get",
|
||||
data: {
|
||||
fromType: "3",
|
||||
fromId: this.data.id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
flowRecordList: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 手风琴
|
||||
onChange(event) {
|
||||
this.setData({
|
||||
activeName: event.detail,
|
||||
});
|
||||
},
|
||||
// 手风琴
|
||||
onChange(event) {
|
||||
this.setData({
|
||||
activeName: event.detail,
|
||||
});
|
||||
},
|
||||
|
||||
// list 上传图片
|
||||
onImagesArr(e){
|
||||
onImagesArr(e) {
|
||||
var data = this.data.imageInfoData
|
||||
data = e.detail
|
||||
this.setData({
|
||||
imageInfoData:data
|
||||
imageInfoData: data
|
||||
})
|
||||
},
|
||||
|
||||
//添加质量专员
|
||||
onAddQualityUser(e){
|
||||
if(e.detail.length>0){
|
||||
onAddQualityUser(e) {
|
||||
if (e.detail.length > 0) {
|
||||
this.setData({
|
||||
qualityUser:e.detail[0].phoneNumber,
|
||||
qualityUserName:e.detail[0].userName
|
||||
qualityUser: e.detail[0].phoneNumber,
|
||||
qualityUserName: e.detail[0].userName
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//添加监理专员
|
||||
onAddSuperviseUser(e){
|
||||
if(e.detail.length>0){
|
||||
onAddSuperviseUser(e) {
|
||||
if (e.detail.length > 0) {
|
||||
this.setData({
|
||||
superviseUser:e.detail[0].phoneNumber,
|
||||
superviseUserName:e.detail[0].userName
|
||||
superviseUser: e.detail[0].phoneNumber,
|
||||
superviseUserName: e.detail[0].userName
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
//保存
|
||||
onProblemSubmitSave(){
|
||||
onProblemSubmitSave() {
|
||||
this.setData({
|
||||
loadShow:true
|
||||
loadShow: true
|
||||
})
|
||||
let that = this
|
||||
let {id,qualityUser,qualityUserName,superviseUser,superviseUserName,checkWorkingPosition,intro,checkTime,imageInfoData,loginName,dataTypeLvl1,dataTypeLvl2} = that.data;
|
||||
let {
|
||||
id,
|
||||
qualityUser,
|
||||
qualityUserName,
|
||||
superviseUser,
|
||||
superviseUserName,
|
||||
checkWorkingPosition,
|
||||
intro,
|
||||
checkTime,
|
||||
imageInfoData,
|
||||
loginName,
|
||||
dataTypeLvl1,
|
||||
dataTypeLvl2,
|
||||
checkingFiles
|
||||
} = that.data;
|
||||
//数据效验
|
||||
if(id==""){
|
||||
if (id == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(imageInfoData.length==0){
|
||||
if (imageInfoData.length == 0) {
|
||||
app.toast("请上传举牌验收现场图片!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(dataTypeLvl1==""){
|
||||
if (dataTypeLvl1 == "") {
|
||||
app.toast("请选择验收类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(dataTypeLvl2==""){
|
||||
if (dataTypeLvl2 == "") {
|
||||
app.toast("请选择类型分类!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(qualityUser==""||qualityUserName==""){
|
||||
if (qualityUser == "" || qualityUserName == "") {
|
||||
app.toast("请选择质量专员!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(superviseUser==""||superviseUserName==""){
|
||||
if (superviseUser == "" || superviseUserName == "") {
|
||||
app.toast("请选择监理专员!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkWorkingPosition==""){
|
||||
if (checkWorkingPosition == "") {
|
||||
app.toast("请填写验收工序部位!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(intro==""){
|
||||
if (intro == "") {
|
||||
app.toast("请填写验收结果描述!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(checkTime==""){
|
||||
if (checkTime == "") {
|
||||
app.toast("请选择验收时间!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
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 = [];
|
||||
imageInfoData.forEach(async (item)=>{
|
||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
||||
let name = "file"
|
||||
let _checkingFiles = [];
|
||||
imageInfoData.forEach(async (item) => {
|
||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||
let name = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
if(item.indexOf(that.data.request)>-1){
|
||||
fileUrls.push(item.replace(that.data.request,"").replace(".min.jpg",""));
|
||||
}else{
|
||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
||||
if (item.indexOf(that.data.request) > -1) {
|
||||
fileUrls.push(item.replace(that.data.request, "").replace(".min.jpg", ""));
|
||||
} else {
|
||||
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||
fileUrls.push(obj.data.fileName);
|
||||
}
|
||||
//验证图片上传完毕
|
||||
if(fileUrls.length == imageInfoData.length){
|
||||
if (fileUrls.length == imageInfoData.length) {
|
||||
let params = {
|
||||
id,
|
||||
qualityUser,
|
||||
|
@ -417,70 +492,96 @@ Page({
|
|||
superviseUserName,
|
||||
checkWorkingPosition,
|
||||
intro,
|
||||
checkingDate:checkTime,
|
||||
approveStatus:"1",
|
||||
updateBy:loginName,
|
||||
imageUrls:fileUrls.toString(),
|
||||
checkingDate: checkTime,
|
||||
approveStatus: "1",
|
||||
updateBy: loginName,
|
||||
imageUrls: fileUrls.toString(),
|
||||
dataTypeLvl1,
|
||||
dataTypeLvl2,
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/edit',
|
||||
method:"POST",
|
||||
data:params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
res =res.data
|
||||
if(res.code == 200){
|
||||
app.toast("修改成功!")
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
if (checkingFiles.length > 0) {
|
||||
checkingFiles.forEach(async (file) => {
|
||||
if (file.path.indexOf('/profile/') > -1) {
|
||||
_checkingFiles.push(file.path);
|
||||
} else {
|
||||
let obj = await that.syncUploadImage(uploadUrl, file.path, name);
|
||||
_checkingFiles.push(obj.data.fileName);
|
||||
}
|
||||
}
|
||||
})
|
||||
if (checkingFiles.length == _checkingFiles.length) {
|
||||
params.checkingFiles = JSON.stringify(_checkingFiles);
|
||||
this.submitForm(params);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.submitForm(params);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
* @param {*} params
|
||||
*/
|
||||
submitForm(params){
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/edit',
|
||||
method: "POST",
|
||||
data: params,
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res) {
|
||||
that.setData({
|
||||
loadShow: false
|
||||
})
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
app.toast("修改成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url,uploadFile,name) {
|
||||
syncUploadImage(url, uploadFile, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: { user: 'test' },
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
@ -490,7 +591,18 @@ Page({
|
|||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 相关附件上传
|
||||
* @param {*} options
|
||||
*/
|
||||
otherFileUpload(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
checkingFiles: file
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">验收图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -95,7 +95,13 @@
|
|||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">验收时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-datetime counts="5" currentDate="{{currentDate}}" placeholder="请选择验收时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkingDate}}"></voucher-datetime>
|
||||
<voucher-date counts="5" placeholder="请选择验收时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{infoData.checkingDate}}"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">其它附件 <text class="code_label_2" style="color: #CCC;">[非必填项]</text></view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="otherFileUpload" limit="{{10}}" fileUrlArray="{{fileUrlArray}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -25,7 +25,8 @@ Page({
|
|||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 100
|
||||
active: 100,
|
||||
checkingFiles:[]
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -78,16 +79,27 @@ Page({
|
|||
})
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
let checkingFiles = [];
|
||||
if (res.data.imageUrls) {
|
||||
res.data.imageUrls.split(',').forEach(element => {
|
||||
urls.push(that.data.request + element);
|
||||
minUrls.push(that.data.request + element + '.min.jpg');
|
||||
});
|
||||
}
|
||||
if(res.data.checkingFiles){
|
||||
let files = JSON.parse(res.data.checkingFiles);
|
||||
if(files && files.length>0){
|
||||
files.forEach(item =>{
|
||||
let it = item.split('/');
|
||||
checkingFiles.push({'name':it[it.length-1],path:item});
|
||||
});
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
infoData: res.data,
|
||||
imageList: urls,
|
||||
minImageList: minUrls,
|
||||
checkingFiles,
|
||||
loadShow: false
|
||||
})
|
||||
//判断当前能否删除
|
||||
|
@ -194,6 +206,31 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载附件
|
||||
* @param {*} e
|
||||
*/
|
||||
downFile: function (e) {
|
||||
let {
|
||||
path,
|
||||
} = e.currentTarget.dataset.set
|
||||
wx.downloadFile({
|
||||
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
|
|
@ -116,13 +116,24 @@
|
|||
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
|
||||
<van-col span="18"></van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
|
||||
<view class="files_parent" wx:for="{{checkingFiles}}" wx:key="index" bindtap="downFile" data-set="{{item}}">
|
||||
<text class="color_blue files">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 10rpx 40rpx;font-size: 25rpx;">待审批</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 10rpx 40rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 10rpx 40rpx;font-size: 25rpx;">不合格</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/securityCheckGR/index.js
|
||||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -64,6 +66,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/login/index',
|
||||
})
|
||||
}
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
|
@ -93,6 +100,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
||||
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">保险合同
|
||||
<text style="font-size: small;">[仅可上传PDF格式]</text>
|
||||
</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" data-index="{{0}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -65,13 +65,13 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">会签单图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArrSignFiles" data-index="{{1}}" limit="{{limit}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{showBgd}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">变更单图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArrAlterationFiles" data-index="{{2}}" limit="{{limit}}"></file-uploader>
|
||||
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
|
||||
</view>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">封样图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" data-index="{{0}}" fileUrlArray="{{imageInfoData}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -94,13 +94,13 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">会签单图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArrSignFiles" data-index="{{1}}" limit="{{1}}" fileUrlArray="{{signFileData}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{showBgd}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">变更单图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArrAlterationFiles" data-index="{{2}}" limit="{{1}}" fileUrlArray="{{alterationFileData}}"></file-uploader>
|
||||
<text class="safety_inspect_title module_title_flex">合同指定品牌和拟用品牌不一致时需要上传</text>
|
||||
</view>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/securityCheckGR/index.js
|
||||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -49,6 +51,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/login/index',
|
||||
})
|
||||
}
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
|
@ -78,12 +85,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
||||
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
|
||||
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
||||
</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" fileUrlArray="{{imageInfoData}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">测量附件
|
||||
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
||||
</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}" fileUrlArray="{{filesData}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/securityCheckGR/index.js
|
||||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -51,6 +53,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../../pages/login/index',
|
||||
})
|
||||
}
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
|
@ -80,12 +87,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='jxz'?'active':''}}" bindtap="typeJump" data-index="1"><text>进行中({{jxzCount}})</text></view>
|
||||
<view class="{{activeState=='ywc'?'active':''}}" bindtap="typeJump" data-index="2"><text>已完成({{ywcCount}})</text></view>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// pageage/safetyManagement/securityCheckGR/index.js
|
||||
import {
|
||||
getToken
|
||||
} from '../../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -64,6 +66,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/login/index',
|
||||
})
|
||||
}
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
|
@ -93,12 +100,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='zg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>整改({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='fj'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>复检({{dfjCount}})</text></view>
|
||||
|
@ -57,7 +57,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">隐患图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
// pageage/safetyManagement/securityCheckGR/index.js
|
||||
import {
|
||||
getToken
|
||||
} from '../../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
|
@ -57,6 +58,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../../../pages/login/index',
|
||||
})
|
||||
}
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
|
@ -86,12 +92,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='zg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>整改({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='fj'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>复检({{dfjCount}})</text></view>
|
||||
|
@ -56,7 +56,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">形象进度图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" fileUrlArray="{{uploadImages}}"
|
||||
></file-uploader>
|
||||
</view>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">证书附件
|
||||
<text style="font-size: small;">[可上传PDF和图片格式]</text>
|
||||
</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// pageage/safetyManagement/addSafetyInspect/index.js
|
||||
import jsonConfig from '../../../utils/json'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -6,58 +6,119 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
deptId:"",
|
||||
projectId:"",
|
||||
projectName:"",
|
||||
loginName:"",
|
||||
imageInfoData:[],
|
||||
loadShow:false,
|
||||
standardType:"1",
|
||||
standardTypeList:[],
|
||||
info:"",
|
||||
standardDesc:""
|
||||
deptId: "",
|
||||
projectId: "",
|
||||
projectName: "",
|
||||
loginName: "",
|
||||
imageInfoData: [],
|
||||
loadShow: false,
|
||||
standardType: "1",
|
||||
standardTypeList: [],
|
||||
info: "",
|
||||
standardDesc: "",
|
||||
standardNotes:[],
|
||||
showPopup:false,
|
||||
showDetailsName:"",
|
||||
activeId:null,
|
||||
mainActiveIndex:0,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {projectId,projectName} = options
|
||||
let {
|
||||
projectId,
|
||||
projectName
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
projectId,
|
||||
projectName,
|
||||
deptId:res.data.deptId,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
projectId,
|
||||
projectName,
|
||||
deptId: res.data.deptId,
|
||||
loginName: res.data.loginName
|
||||
})
|
||||
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
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectStandard/queryStandardType',
|
||||
method:"get",
|
||||
data:{},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
url: app.globalData.reqUrl + '/wechat/projectStandard/queryStandardType',
|
||||
method: "get",
|
||||
data: {},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let list=[];
|
||||
res.data.forEach(it =>{
|
||||
list.push({"id":it.dictValue,"text":it.dictLabel,"info":it.remark});
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
res.data.forEach(it => {
|
||||
list.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel,
|
||||
"info": it.remark
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
standardTypeList:list,
|
||||
standardType:res.data[0].dictValue,
|
||||
info:res.data[0].remark
|
||||
standardTypeList: list,
|
||||
standardType: res.data[0].dictValue,
|
||||
info: res.data[0].remark
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +126,7 @@ Page({
|
|||
},
|
||||
|
||||
//图片描述
|
||||
onInputStandardDesc(e){
|
||||
onInputStandardDesc(e) {
|
||||
let standardDesc = e.detail.value
|
||||
this.setData({
|
||||
standardDesc
|
||||
|
@ -73,148 +134,166 @@ Page({
|
|||
},
|
||||
|
||||
// list 上传图片
|
||||
onImagesArr(e){
|
||||
onImagesArr(e) {
|
||||
var data = this.data.imageInfoData
|
||||
data = e.detail
|
||||
this.setData({
|
||||
imageInfoData:data
|
||||
imageInfoData: data
|
||||
})
|
||||
},
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
//保存
|
||||
onSave(){
|
||||
onSave() {
|
||||
this.setData({
|
||||
loadShow:true
|
||||
loadShow: true
|
||||
})
|
||||
let that = this
|
||||
let {projectId,loginName, deptId,standardType,standardDesc,imageInfoData} = that.data;
|
||||
let {
|
||||
projectId,
|
||||
loginName,
|
||||
deptId,
|
||||
standardType,
|
||||
standardDesc,
|
||||
imageInfoData,
|
||||
activeId
|
||||
} = that.data;
|
||||
//数据效验
|
||||
if(projectId==""||loginName==""||deptId==""){
|
||||
if (projectId == "" || loginName == "" || deptId == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(imageInfoData.length==0){
|
||||
app.toast("请上传标准图片!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(standardType==""){
|
||||
if (standardType == "") {
|
||||
app.toast("请选择标准类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
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("请填写图片描述!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
let fileUrls = [];
|
||||
imageInfoData.forEach(async (item)=>{
|
||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
||||
let name = "file"
|
||||
imageInfoData.forEach(async (item) => {
|
||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||
let name = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
||||
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||
fileUrls.push(obj.data.fileName);
|
||||
//验证图片上传完毕
|
||||
if(fileUrls.length == imageInfoData.length){
|
||||
if (fileUrls.length == imageInfoData.length) {
|
||||
let params = {
|
||||
projectId,
|
||||
deptId,
|
||||
imageFile:fileUrls.toString(),
|
||||
standardType,
|
||||
imageFile: fileUrls.toString(),
|
||||
standardType:activeId,
|
||||
standardDesc,
|
||||
ord:1,
|
||||
createBy:loginName
|
||||
ord: 1,
|
||||
createBy: loginName
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectStandard/add',
|
||||
method:"POST",
|
||||
data:params,
|
||||
method: "POST",
|
||||
data: params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
app.toast("添加成功!")
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url,uploadFile,name) {
|
||||
syncUploadImage(url, uploadFile, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: { user: 'test' },
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
//选择测量类型
|
||||
onSelectStandardType(e){
|
||||
//选择项目标准类型
|
||||
onSelectStandardType(e) {
|
||||
this.setData({
|
||||
standardType:e.detail.id,
|
||||
info:e.detail.info
|
||||
standardType: e.detail.id,
|
||||
info: e.detail.info
|
||||
})
|
||||
this.initStandardTypeListNotes(e.detail.id);
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-popup": "@vant/weapp/popup",
|
||||
"van-tree-select": "@vant/weapp/tree-select/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,48 +1,59 @@
|
|||
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">新增项目标准</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">新增项目标准</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">标准类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{standardTypeList}}" placeholder="请选择标准类型" bindchange="onSelectStandardType"></voucher-select>
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<text class="color_blue">{{info}}</text>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">标准类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{standardTypeList}}" placeholder="请选择标准类型" bindchange="onSelectStandardType"></voucher-select>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<text class="color_blue">{{info}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">类型明细</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请选择类型明细" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" value="{{showDetailsName}}" bindtap="onShowPopup" />
|
||||
<van-popup show="{{ showPopup }}" bind:close="onClosePopup" position="bottom" round="5">
|
||||
<van-tree-select items="{{ standardNotes }}" main-active-index="{{ mainActiveIndex }}" active-id="{{ activeId }}" bind:click-nav="onClickNav" bind:click-item="onClickItem">
|
||||
</van-tree-select>
|
||||
</van-popup>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">标准图片</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" limit="{{1}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">图片描述</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写图片描述" placeholder-style="color:#6777aa;" bindinput="onInputStandardDesc" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">标准图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<file-uploader bindimages="onImagesArr" limit="{{1}}"></file-uploader>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">提交</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">图片描述</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写图片描述"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputStandardDesc" maxlength="200"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-overlay show="{{loadShow}}">
|
||||
|
@ -50,52 +61,4 @@
|
|||
<image src="/images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</van-overlay>
|
|
@ -1,7 +1,99 @@
|
|||
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
||||
.van-popup{
|
||||
background: none !important;
|
||||
}
|
||||
.van-image__img{
|
||||
border-radius: 10rpx !important;
|
||||
}
|
||||
.radio_custom_class{
|
||||
padding: 10rpx 100rpx 10rpx 0;
|
||||
}
|
||||
.radio_label_class{
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.max_tab_name{
|
||||
padding: 0 40rpx;
|
||||
font-size:30rpx;
|
||||
height: 460rpx;
|
||||
overflow: auto;
|
||||
margin-top: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.van-popup.van-popup--bottom{
|
||||
background: #232a44;
|
||||
}
|
||||
.van-popup {
|
||||
background-color: var(--popup-background-color,#232a44) !important;
|
||||
}
|
||||
.font_color{
|
||||
padding: 15rpx 0;
|
||||
color: #157dd2;
|
||||
}
|
||||
.active{
|
||||
font-size:30rpx;
|
||||
font-weight: 600;
|
||||
color: #14feff
|
||||
}
|
||||
.van-collapse.van-hairline--top-bottom:after{
|
||||
border-width: 0px 0;
|
||||
}
|
||||
.van-cell.van-cell--borderless{
|
||||
background-color: #2b345b;
|
||||
color: #fff;
|
||||
margin-top: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
.van-cell.van-cell--borderless:active{
|
||||
background-color: #2b345b;
|
||||
}
|
||||
.van-collapse-item__title.van-collapse-item__title--expanded:active{
|
||||
background-color: #2b345b;
|
||||
}
|
||||
.van-collapse-item .van-cell:after{
|
||||
border-bottom: 0;
|
||||
}
|
||||
.van-collapse-item.van-hairline--top:after{
|
||||
border-top-width:0
|
||||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
}
|
||||
.van-cell.van-cell--clickable:active{
|
||||
background-color: #2b345b;
|
||||
}
|
||||
.van-collapse-item__wrapper .van-collapse-item__content{
|
||||
background-color: #1e2336;
|
||||
color:#8ca4ec ;
|
||||
border-width: 0px 0;
|
||||
}
|
||||
.text_active{
|
||||
padding-left: 5rpx;
|
||||
color: #8369f5;
|
||||
}
|
||||
.van-sidebar{
|
||||
background-color: #212737!important;
|
||||
}
|
||||
.van-sidebar-item{
|
||||
color: #EFEFEF!important;
|
||||
background-color: #212737!important;
|
||||
}
|
||||
.van-sidebar-item--selected{
|
||||
border-color:var(--sidebar-selected-border-color,#8369f5)!important;
|
||||
background-color: #252d41 !important;
|
||||
color: #83a5ef !important;
|
||||
}
|
||||
.van-tree-select__content{
|
||||
background-color:#252d41 !important;
|
||||
}
|
||||
.van-tree-select__item--active {
|
||||
color: var(--tree-select-item-active-color,#8369f5) !important;
|
||||
}
|
||||
.van-tree-select{
|
||||
height: 800rpx !important;
|
||||
}
|
||||
.van-popup.van-popup--bottom {
|
||||
margin-bottom: -55rpx !important;
|
||||
}
|
|
@ -1,182 +1,235 @@
|
|||
// pageage/project_checking/info/index.js
|
||||
import jsonConfig from '../../../utils/json'
|
||||
import {
|
||||
getDictCache
|
||||
} from '../../../api/publics'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
loadShow:false,
|
||||
loginName:"",
|
||||
projectName:"",
|
||||
showDel:false,
|
||||
imageList:[],
|
||||
minImageList:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: "",
|
||||
type: "",
|
||||
infoData: {},
|
||||
loadShow: false,
|
||||
loginName: "",
|
||||
projectName: "",
|
||||
showDel: false,
|
||||
imageList: [],
|
||||
minImageList: [],
|
||||
request: app.globalData.reqUrl,
|
||||
standardTypeName: "",
|
||||
standardTypeRemark: "",
|
||||
standardNotesName: "",
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName,
|
||||
projectName:app.globalData.projectName
|
||||
})
|
||||
this.getInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectStandard/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if(res.data.imageFile){
|
||||
res.data.imageFile.split(',').forEach(element => {
|
||||
urls.push(that.data.request+element);
|
||||
minUrls.push(that.data.request+element+'.min.jpg');
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
imageList:urls,
|
||||
minImageList:minUrls,
|
||||
loadShow:false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if(res.data.createBy!=that.data.loginName){
|
||||
that.setData({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id,
|
||||
standardType
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
type: standardType.substring(0, 1),
|
||||
loginName: res.data.loginName,
|
||||
projectName: app.globalData.projectName
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectStandard/remove',
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showImg:function(e){
|
||||
var that=this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
this.getDicts();
|
||||
this.getInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
//获取字典信息
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectStandard/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if (res.data.imageFile) {
|
||||
res.data.imageFile.split(',').forEach(element => {
|
||||
urls.push(that.data.request + element);
|
||||
minUrls.push(that.data.request + element + '.min.jpg');
|
||||
});
|
||||
}
|
||||
if (that.data.type != res.data.standardType) {
|
||||
let index = that.data.type - 1;
|
||||
jsonConfig.standardTypeListNotes[index].forEach(it => {
|
||||
if (it.children && it.children.length > 0) {
|
||||
it.children.forEach(i => {
|
||||
if (i.id == res.data.standardType) {
|
||||
that.setData({
|
||||
standardNotesName: i.text
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (it.id == res.data.standardType) {
|
||||
that.setData({
|
||||
standardNotesName: it.text
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
infoData: res.data,
|
||||
imageList: urls,
|
||||
minImageList: minUrls,
|
||||
loadShow: false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if (res.data.createBy == that.data.loginName) {
|
||||
that.setData({
|
||||
showDel: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
onDelete() {
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectStandard/remove',
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
method: "get",
|
||||
success(res) {
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
//展示图片
|
||||
showImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -21,10 +21,16 @@
|
|||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">标准类型</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.standardTypeName}}</van-col>
|
||||
<van-col span="18" class="color_blue">{{standardTypeName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list color_blue">{{infoData.standardTypeRemark}}</view>
|
||||
<view class="inspect_overview_list color_blue">{{standardTypeRemark}}</view>
|
||||
<view class="inspect_overview_list" wx:if="{{type != infoData.standardType}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">类型明细</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{standardNotesName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">标准图片</text></van-col>
|
||||
|
|
|
@ -63,10 +63,10 @@ Page({
|
|||
|
||||
getInfo(e) {
|
||||
let {
|
||||
id
|
||||
id,standardType
|
||||
} = e.currentTarget.dataset.set
|
||||
wx.redirectTo({
|
||||
url: `../info/index?id=${id}`
|
||||
url: `../info/index?id=${id}&standardType=${standardType}`
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -79,7 +79,11 @@ Page({
|
|||
standard = options.standard;
|
||||
app.globalData.standard = options.standard;
|
||||
} else {
|
||||
standard = app.globalData.standard;
|
||||
if(app.globalData.standard){
|
||||
standard = app.globalData.standard;
|
||||
}else{
|
||||
standard = 1;
|
||||
}
|
||||
}
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">{{minTitle}}图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" limit="{{limit}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -57,7 +57,7 @@
|
|||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">相关文件
|
||||
<text style="font-size: small;">[可上传PDF/图片/WORD/PPT/XLS格式]</text>
|
||||
</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<view class="max_tab_name">
|
||||
<view class="option_list_title">
|
||||
<view class="option_list_title_btn" bindtap="onCloseDept">取消</view>
|
||||
<view>请选择协作团队</view>
|
||||
<view style="color: #BBB;">请选择协作团队</view>
|
||||
<view class="option_list_title_btn" bindtap="onCloseDept">确认</view>
|
||||
</view>
|
||||
<view wx:for="{{projectDeptList}}" wx:key="index" data-index="{{index}}" bindtap="changeDept" data-name="{{item.deptName}}" data-id="{{item.deptId}}" class="font_color {{ item.state=='1' ? 'active' :' '}}">{{item.deptName}}</view>
|
||||
|
|
|
@ -36,20 +36,20 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 30rpx 0 20rpx;">存在问题</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写" placeholder-style="color:#6777aa;" class="inspect_input_fill_in"
|
||||
value="{{item.existing_problems}}" bindinput="onPositionInput" data-index="{{index}}"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">检查图片</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="onImagesArr" data-index="{{index}}" fileUrlArray="{{item.image_upload}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 30rpx 0 20rpx;">整改责任人</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<select-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddResponsible" data-index="{{index}}" choose="{{item.person_responsible}}"></select-person>
|
||||
<!-- <view class="nspect_info_rectifier">
|
||||
<van-row>
|
||||
|
|
|
@ -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;
|
||||
border: 1px dashed #28345a;
|
||||
border-radius: 10rpx;
|
||||
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/img/WEB_162F576788AE44F08ADDFFC06CD5923F.png") no-repeat center/70%;
|
||||
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/icon/f3.png") no-repeat center/70%;
|
||||
}
|
||||
.in-img-div image{
|
||||
width: 180rpx;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
height:180rpx;
|
||||
border: 1px dashed #28345a;
|
||||
border-radius: 10rpx;
|
||||
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/img/WEB_162F576788AE44F08ADDFFC06CD5923F.png") no-repeat center/70%;
|
||||
background: #28345a url("https://szgcwx.jhncidg.com/staticFiles/icon/WF1.png") no-repeat center/70%;
|
||||
}
|
||||
.in-img-div image{
|
||||
width: 180rpx;
|
||||
|
|
|
@ -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">
|
||||
<view class="option_list_title">
|
||||
<view class="option_list_title_btn" bindtap="onClose">取消</view>
|
||||
<view style="text-align: center;"><input placeholder="请输入项目名称搜索" style="width: 280rpx;" bindinput="findProject" value="{{findProjectValue}}" /></view>
|
||||
<view style="text-align: center;"><input placeholder="请输入项目名称搜索" placeholder-style="color:#638fbd;" style="width: 280rpx;" bindinput="findProject" value="{{findProjectValue}}" /></view>
|
||||
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
|
||||
</view>
|
||||
<van-picker columns="{{ columns }}" bind:change="onSelectChange" custom-class="time_select_style" default-index="{{ index }}" column-class="time_list_style" active-class="time_active_style" toolbar-class="toolbar_style" visible-item-count="5" />
|
||||
|
|
|
@ -3,6 +3,7 @@ import {
|
|||
} from '../../../utils/auth'
|
||||
import {
|
||||
loginOut,
|
||||
updatePwd,
|
||||
findOpenUserMsgId
|
||||
} from '../../../api/login'
|
||||
|
||||
|
@ -190,33 +191,26 @@ Component({
|
|||
app.toast("请输入确认密码长度 [6-20]位字符!");
|
||||
return;
|
||||
}
|
||||
wx.request({
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: app.globalData.reqUrl + '/wechat/updatePassword',
|
||||
data: {
|
||||
loginName: that.data.loginName,
|
||||
oldPsw: that.data.oldPsw,
|
||||
newPsw: that.data.newPsw,
|
||||
password: that.data.password
|
||||
},
|
||||
method: "POST",
|
||||
success: function (res) {
|
||||
if (res.data && res.data.data == "200") {
|
||||
removeToken();
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1");
|
||||
app.toast("密码修改成功!");
|
||||
let data = {
|
||||
loginName: that.data.loginName,
|
||||
oldPass: that.data.oldPsw,
|
||||
password: that.data.newPsw,
|
||||
confPass: that.data.password,
|
||||
source:"u"
|
||||
}
|
||||
updatePwd(data).then(res =>{
|
||||
if(res.code==200){
|
||||
app.toast("密码修改成功,请重新登录!",800);
|
||||
removeToken();
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1");
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../login/index',
|
||||
url: '../login/index',
|
||||
});
|
||||
} else {
|
||||
app.toast(res.data.info);
|
||||
return;
|
||||
}
|
||||
},500)
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
|
@ -41,7 +41,6 @@ Component({
|
|||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
show: false,
|
||||
forData:[],
|
||||
echoData:[],
|
||||
|
@ -60,7 +59,7 @@ Component({
|
|||
onSelectChange(e){
|
||||
var data = this.data.forData
|
||||
var index = e.currentTarget.dataset.index
|
||||
if(data[index].type == false){
|
||||
if(data[index].type === undefined || data[index].type == false){
|
||||
data[index].type = true
|
||||
}else{
|
||||
data[index].type = false
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
|
||||
<view class="option_list_title">
|
||||
<view class="option_list_title_btn" bindtap="onClose">取消</view>
|
||||
<view>{{placeholder}}</view>
|
||||
<view style="color: #BBB;">{{placeholder}}</view>
|
||||
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
|
||||
</view>
|
||||
<view class="option_list_max">
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
line-height: 90rpx;
|
||||
}
|
||||
.option_list_list.active{
|
||||
color: #ffffff;
|
||||
color: #06d4f8;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,10 +31,7 @@ Page({
|
|||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
this.setData({
|
||||
projectId:projectId,
|
||||
projectName:projectName
|
||||
})
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -476,14 +476,14 @@ Page({
|
|||
if(that.data.userInfo.minRoleId<4){
|
||||
if(deptId=="0"){
|
||||
//存入文件中
|
||||
wx.setStorageSync({
|
||||
wx.setStorage({
|
||||
key: 'projectInfoList',
|
||||
data: res.data
|
||||
});
|
||||
}
|
||||
}else{
|
||||
//存入文件中
|
||||
wx.setStorageSync({
|
||||
wx.setStorage({
|
||||
key: 'projectInfoList',
|
||||
data: res.data
|
||||
});
|
||||
|
|
|
@ -36,6 +36,15 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 忘记密码
|
||||
*/
|
||||
updatePs(){
|
||||
wx.redirectTo({
|
||||
url: '../alter-ps/index',
|
||||
})
|
||||
},
|
||||
|
||||
//获取填写的密码信息
|
||||
code: function (even) {
|
||||
this.setData({
|
||||
|
@ -117,7 +126,7 @@ Page({
|
|||
key: 'userinfo',
|
||||
data: res.data.data.userinfo
|
||||
});
|
||||
if(res.data.token){
|
||||
if (res.data.token) {
|
||||
//更新token信息
|
||||
setToken(res.data.token);
|
||||
}
|
||||
|
@ -153,6 +162,7 @@ Page({
|
|||
}
|
||||
} else {
|
||||
that.onClickHide();
|
||||
app.toast(res.data.msg, 2000);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -180,11 +190,11 @@ Page({
|
|||
var password = that.data.password;
|
||||
var usercode = this.data.usercode;
|
||||
if (username == "") {
|
||||
app.toast("账号不能为空");
|
||||
app.toast("登录账号不能为空");
|
||||
return;
|
||||
}
|
||||
if (password == "") {
|
||||
app.toast("密码不能为空");
|
||||
app.toast("登录密码不能为空");
|
||||
return;
|
||||
}
|
||||
if (usercode == "") {
|
||||
|
@ -199,61 +209,50 @@ Page({
|
|||
return;
|
||||
}
|
||||
}
|
||||
//启动蒙版
|
||||
that.onClickShow();
|
||||
//发送请求
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/login',
|
||||
data: {
|
||||
"username": username,
|
||||
"password": password,
|
||||
"openId": openId,
|
||||
"code": usercode,
|
||||
"uuid": this.data.uuid,
|
||||
},
|
||||
method: "POST",
|
||||
success(res) {
|
||||
//关闭蒙版
|
||||
that.onClickHide();
|
||||
if (res.data.code == '200') {
|
||||
//把数据存到缓存中
|
||||
let params = {
|
||||
"username": username,
|
||||
"password": password,
|
||||
"openId": openId,
|
||||
"code": usercode,
|
||||
"uuid": this.data.uuid,
|
||||
};
|
||||
login(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
//把数据存到缓存中
|
||||
wx.setStorage({
|
||||
key: 'userinfo',
|
||||
data: res.data.userinfo
|
||||
});
|
||||
setToken(res.token);
|
||||
wx.setStorageSync('isReload', "");
|
||||
let rd = res.data;
|
||||
//只有一个项目时直接跳转详情页
|
||||
if (rd.projectInfo != null || rd.projectInfo != undefined) {
|
||||
//赋值到公共参数
|
||||
app.globalData.projectId = rd.projectInfo.projectId;
|
||||
app.globalData.projectName = rd.projectInfo.projectName;
|
||||
app.globalData.projectInfoList = [];
|
||||
app.globalData.projectInfoList.push(rd.projectInfo);
|
||||
app.globalData.value1 = rd.projectInfo.shengName;
|
||||
app.globalData.value2 = rd.projectInfo.shiName + '/' + rd.projectInfo.quName;
|
||||
app.globalData.value3 = rd.projectInfo.logCompanyName;
|
||||
//存入文件中
|
||||
wx.setStorage({
|
||||
key: 'userinfo',
|
||||
data: res.data.data.userinfo
|
||||
key: 'projectInfoList',
|
||||
data: app.globalData.projectInfoList
|
||||
});
|
||||
setToken(res.data.token);
|
||||
let rd = res.data.data;
|
||||
wx.setStorageSync('isReload', "");
|
||||
//只有一个项目时直接跳转详情页
|
||||
if (rd.projectInfo != null || rd.projectInfo != undefined) {
|
||||
//赋值到公共参数
|
||||
app.globalData.projectId = rd.projectInfo.projectId;
|
||||
app.globalData.projectName = rd.projectInfo.projectName;
|
||||
app.globalData.projectInfoList = [];
|
||||
app.globalData.projectInfoList.push(rd.projectInfo);
|
||||
app.globalData.value1 = rd.projectInfo.shengName;
|
||||
app.globalData.value2 = rd.projectInfo.shiName + '/' + rd.projectInfo.quName;
|
||||
app.globalData.value3 = rd.projectInfo.logCompanyName;
|
||||
//存入文件中
|
||||
wx.setStorage({
|
||||
key: 'projectInfoList',
|
||||
data: app.globalData.projectInfoList
|
||||
});
|
||||
wx.redirectTo({
|
||||
url: '../xiangmugaikuang/index',
|
||||
})
|
||||
} else {
|
||||
//跳转页面
|
||||
wx.redirectTo({
|
||||
url: '../map/map',
|
||||
})
|
||||
}
|
||||
wx.redirectTo({
|
||||
url: '../xiangmugaikuang/index',
|
||||
})
|
||||
} else {
|
||||
that.loadCodeImage();
|
||||
app.toast(res.data.msg,1000);
|
||||
//跳转页面
|
||||
wx.redirectTo({
|
||||
url: '../map/map',
|
||||
})
|
||||
}
|
||||
}else{
|
||||
that.loadCodeImage();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
})
|
|
@ -25,12 +25,23 @@
|
|||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<view class="lv" wx:if="{{true}}">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<text style="color:#191d28;">验证码登录</text>
|
||||
</van-col>
|
||||
<van-col span="12" class="lv-r">
|
||||
<van-icon name="question" /><text bindtap="updatePs">忘记密码?立即修改</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="login_btn" bindtap="userLogin">
|
||||
确 定
|
||||
</view>
|
||||
|
||||
<view class="pc">电脑端登陆 https://szgc.jhncidg.com</view>
|
||||
<van-overlay show="{{show}}">
|
||||
<view class="gif">
|
||||
<image src="../../images/loding2.gif"></image>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
/* pages/login/index.wxss */
|
||||
page{
|
||||
page {
|
||||
background: #191d28 url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
|
||||
}
|
||||
.login_title{
|
||||
|
||||
.login_title {
|
||||
height: 180rpx;
|
||||
line-height: 180rpx;
|
||||
color: #DDDDDD;
|
||||
|
@ -11,55 +12,64 @@ page{
|
|||
text-align: center;
|
||||
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;
|
||||
}
|
||||
.login_bg{
|
||||
|
||||
.login_bg {
|
||||
border-radius: 20rpx;
|
||||
margin: 0 40rpx;
|
||||
padding: 25rpx 40rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.login_dl{
|
||||
|
||||
.login_dl {
|
||||
color: #728ce3;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.login_ex{
|
||||
padding:20rpx 0;
|
||||
|
||||
.login_ex {
|
||||
padding: 20rpx 0;
|
||||
font-size: 30rpx;
|
||||
border-bottom: 20rpx dashed #728ce3;
|
||||
width: 50%;
|
||||
}
|
||||
.login_input{
|
||||
|
||||
.login_input {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
.login_input .name{
|
||||
|
||||
.login_input .name {
|
||||
background: url("https://szgcwx.jhncidg.com/staticFiles/img/login_name.png") no-repeat left/40rpx;
|
||||
border-bottom: 1px solid #5e6ea2;
|
||||
height: 100rpx;
|
||||
width: 93%;
|
||||
width: 85%;
|
||||
color: #728ce3;
|
||||
padding: 0 50rpx;
|
||||
}
|
||||
.login_btn{
|
||||
margin:80rpx;
|
||||
|
||||
.login_btn {
|
||||
margin: 20rpx 60rpx 60rpx 60rpx;
|
||||
height: 80rpx;
|
||||
background-image: linear-gradient(#5b9fff, #7655fc);
|
||||
border-radius: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 150rpx;
|
||||
}
|
||||
.login_btn:active{
|
||||
margin:82rpx 55rpx 0;
|
||||
|
||||
.login_btn:active {
|
||||
background-image: linear-gradient(#7655fc, #5b9fff);
|
||||
}
|
||||
.login_logo{
|
||||
|
||||
.login_logo {
|
||||
width: 100%;
|
||||
height:100rpx;
|
||||
height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.login_logo image{
|
||||
|
||||
.login_logo image {
|
||||
height: 70rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
@ -82,15 +92,24 @@ page{
|
|||
padding: 0 50rpx;
|
||||
}
|
||||
|
||||
.login_code image{
|
||||
.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;
|
||||
}
|
|
@ -697,14 +697,14 @@ Page({
|
|||
if(that.data.userInfo.minRoleId<4){
|
||||
if(deptId=="0"){
|
||||
//存入文件中
|
||||
wx.setStorageSync({
|
||||
wx.setStorage({
|
||||
key: 'projectInfoList',
|
||||
data: res.data
|
||||
});
|
||||
}
|
||||
}else{
|
||||
//存入文件中
|
||||
wx.setStorageSync({
|
||||
wx.setStorage({
|
||||
key: 'projectInfoList',
|
||||
data: res.data
|
||||
});
|
||||
|
|
|
@ -21,7 +21,8 @@ Page({
|
|||
result:"1",
|
||||
comment:"",
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 3
|
||||
active: 3,
|
||||
attachments:[]
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -79,8 +80,22 @@ Page({
|
|||
}
|
||||
});
|
||||
}
|
||||
let attachments = [];
|
||||
if (res.data.attachment) {
|
||||
let files = JSON.parse(res.data.attachment);
|
||||
if (files && files.length > 0) {
|
||||
files.forEach(item => {
|
||||
let it = item.split('/');
|
||||
attachments.push({
|
||||
'name': it[it.length - 1],
|
||||
path: item
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
attachments,
|
||||
detectionImageList:imageUrls,
|
||||
minDetectionFileImages:minImageUrls,
|
||||
detectionFiles:fileNames,
|
||||
|
@ -246,6 +261,46 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showImg2: function (e) {
|
||||
if (this.data.infoData.trustDeed != null) {
|
||||
let imgs = this.data.infoData.trustDeed.split(',');
|
||||
let list = [];
|
||||
imgs.forEach(item => {
|
||||
list.push(this.data.request + item);
|
||||
})
|
||||
wx.previewImage({
|
||||
urls: list,
|
||||
current: imgs[e.currentTarget.dataset.index]
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载附件
|
||||
* @param {*} e
|
||||
*/
|
||||
downFile2: function (e) {
|
||||
let {
|
||||
path,
|
||||
} = e.currentTarget.dataset.set
|
||||
wx.downloadFile({
|
||||
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!--pageage/safetyManagement/problemRectification/index.wxml-->
|
||||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
|
@ -99,6 +99,27 @@
|
|||
<van-col span="18">{{infoData.laboratoryName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.trustDeed!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">委托单</text></van-col>
|
||||
<view class="problem_list_info_con in-img-max">
|
||||
<view class="in-img-div" wx:for="{{format.split(infoData.trustDeed,',')}}" wx:key="index">
|
||||
<image bindtap='showImg2' data-index="{{index}}" src="{{request+item+'.min.jpg'}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
|
||||
<van-col span="18"></van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{attachments.length>0}}">
|
||||
<view class="files_parent" wx:for="{{attachments}}" wx:key="index" bindtap="downFile2" data-set="{{item}}">
|
||||
<text class="color_blue files">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交单位</text></van-col>
|
||||
|
|
|
@ -17,7 +17,8 @@ Page({
|
|||
result:"1",
|
||||
comment:"",
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 2
|
||||
active: 2,
|
||||
checkingFiles:[]
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -58,16 +59,27 @@ Page({
|
|||
if(res.code == 200){
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
let checkingFiles=[];
|
||||
if(res.data.imageUrls){
|
||||
res.data.imageUrls.split(',').forEach(element => {
|
||||
urls.push(that.data.request+element);
|
||||
minUrls.push(that.data.request+element+'.min.jpg');
|
||||
});
|
||||
}
|
||||
if(res.data.checkingFiles){
|
||||
let files = JSON.parse(res.data.checkingFiles);
|
||||
if(files && files.length>0){
|
||||
files.forEach(item =>{
|
||||
let it = item.split('/');
|
||||
checkingFiles.push({'name':it[it.length-1],path:item});
|
||||
});
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
imageList:urls,
|
||||
minImageList:minUrls,
|
||||
checkingFiles,
|
||||
loadShow:false
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,165 +1,184 @@
|
|||
<!--pageage/safetyManagement/problemRectification/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">举牌验收审批</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">举牌验收审批</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}">
|
||||
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.deptName}}">
|
||||
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.comment}}">
|
||||
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}"><image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text></view>
|
||||
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view>
|
||||
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view>
|
||||
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">单位名称</text></van-col>
|
||||
<van-col span="18">{{infoData.deptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收图片</text></van-col>
|
||||
<view class="problem_list_info_con in-img-max">
|
||||
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
|
||||
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
|
||||
</view>
|
||||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收类型</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl1Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">类型分类</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl2Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">质量专员</text></van-col>
|
||||
<van-col span="18">{{infoData.qualityUserName}} {{infoData.qualityUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">监理专员</text></van-col>
|
||||
<van-col span="18">{{infoData.superviseUserName}} {{infoData.superviseUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">工序部位</text></van-col>
|
||||
<van-col span="18">{{infoData.checkWorkingPosition}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收描述</text></van-col>
|
||||
<van-col span="18">{{infoData.intro}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收时间</text></van-col>
|
||||
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">其它附件</text></van-col>
|
||||
<van-col span="18"></van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{checkingFiles.length>0}}">
|
||||
<view class="files_parent" wx:for="{{checkingFiles}}" wx:key="index" bindtap="downFile" data-set="{{item}}">
|
||||
<text class="color_blue files">{{item.name}}</text>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">单位名称</text></van-col>
|
||||
<van-col span="18">{{infoData.deptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收图片</text></van-col>
|
||||
<view class="problem_list_info_con in-img-max">
|
||||
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
|
||||
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
|
||||
</view>
|
||||
</view>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收类型</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl1Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">类型分类</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl2Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">质量专员</text></van-col>
|
||||
<van-col span="18">{{infoData.qualityUserName}} {{infoData.qualityUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">监理专员</text></van-col>
|
||||
<van-col span="18">{{infoData.superviseUserName}} {{infoData.superviseUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">工序部位</text></van-col>
|
||||
<van-col span="18">{{infoData.checkWorkingPosition}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收描述</text></van-col>
|
||||
<van-col span="18">{{infoData.intro}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收时间</text></van-col>
|
||||
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交时间</text></van-col>
|
||||
<van-col span="18">{{infoData.createTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
|
||||
<van-col span="18">{{infoData.createBy}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview" wx:if="{{infoData.approveStatus=='1'}}">
|
||||
<view class="safety_inspect_title module_title_flex module_title_padding">
|
||||
<view>举牌验收审批结果</view>
|
||||
</view>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">审批结果</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{list}}" placeholder="请选择审批结果" bindchange="onSelect" ></voucher-select>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交时间</text></van-col>
|
||||
<van-col span="18">{{infoData.createTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
|
||||
<van-col span="18">{{infoData.createBy}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_title">审批意见</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写审批意见(200字内)"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputValue" maxlength="200"/>
|
||||
</view>
|
||||
<view class="inspect_overview" wx:if="{{infoData.approveStatus=='1'}}">
|
||||
<view class="safety_inspect_title module_title_flex module_title_padding">
|
||||
<view>举牌验收审批结果</view>
|
||||
</view>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">审批结果</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{list}}" placeholder="请选择审批结果" bindchange="onSelect"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">审批意见</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写审批意见(200字内)" placeholder-style="color:#6777aa;" bindinput="onInputValue" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="returnToPage">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交审批</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="returnToPage">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSubmitSave">提交审批</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="/images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
<view class="gif">
|
||||
<image src="/images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
|
@ -1,4 +1,7 @@
|
|||
import config from '../../../config'
|
||||
import {
|
||||
getDictCache
|
||||
} from '../../../api/publics'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -34,14 +37,19 @@ Page({
|
|||
imageType:["png","jpg","jpeg"],
|
||||
fileType:["pdf"],
|
||||
active: 100,
|
||||
rejectNode:false
|
||||
rejectNode:false,
|
||||
subDeptTypes: [],
|
||||
subDeptScopes: [],
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {deployId,procInsId,procDefName,deptName,nickName,taskId,taskName,projectName} = options
|
||||
let {deployId,procInsId,procDefName,deptName,nickName,taskId,taskName,projectName,procDefKey} = options
|
||||
if (procDefKey == "flow_fbzzsp_fbszzsp") {
|
||||
this.getDicts();
|
||||
}
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
|
@ -67,6 +75,40 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
//获取字典信息
|
||||
getDicts() {
|
||||
let that = this;
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
getDictCache('flow_sub_dept_type').then(res => {
|
||||
if (res.code == 200) {
|
||||
let typeList = [];
|
||||
res.data.forEach(item => {
|
||||
typeList.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
subDeptTypes: typeList
|
||||
})
|
||||
}
|
||||
});
|
||||
getDictCache('flow_sub_dept_scope').then(res => {
|
||||
if (res.code == 200) {
|
||||
let scopeList = [];
|
||||
res.data.forEach(item => {
|
||||
scopeList.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
subDeptScopes: scopeList
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getFlowNode(val){
|
||||
let flowNodeList = this.data.flowNodeList;
|
||||
for(let i=0;i<flowNodeList.length;i++){
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
|
||||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
|
@ -90,6 +90,71 @@
|
|||
<van-col span="18">{{procDefName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list color_purple" wx:if="{{infoData.subDeptType}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text>分包类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<block wx:for="{{subDeptTypes}}" wx:key="index">
|
||||
<text wx:if="{{item.id==infoData.subDeptType}}">{{item.text}}</text>
|
||||
</block>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptScope}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">分包范围</text></van-col>
|
||||
<van-col span="18"><view>
|
||||
<block wx:for="{{format.split(infoData.subDeptScope,',')}}" wx:key="index">
|
||||
<block wx:for="{{subDeptScopes}}" wx:for-item="it" wx:key="idx" wx:for-index="itIdx">
|
||||
<text class="code_label_2 code_label_yellow" wx:if="{{item==it.id}}">{{it.text}}</text>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptName}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">分包单位</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptAptitude}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">分包资质</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptAptitude}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptChairman}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">法人代表</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptChairman}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptSafetyCertificate}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">安全证书</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptSafetyCertificate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodian}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">项目经理</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptCustodian}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodianCardId}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">身份证号</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptCustodianCardId}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptApproachDate}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">进场时间</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptApproachDate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" style="width: 100%;">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">审批内容</text></van-col>
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
||||
.problem_list_info_con{
|
||||
padding-right: 10rpx !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.problem_list_info_con .in-img-div{
|
||||
padding-right: 15rpx !important;
|
||||
}
|
||||
.code_label_2{
|
||||
padding: 8rpx 20rpx 8rpx 20rpx !important;
|
||||
margin-right: 15rpx;
|
||||
width: auto !important;
|
||||
display: inline-block;
|
||||
}
|
||||
.in-img-max:after{
|
||||
display:block;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import config from '../../../config'
|
||||
import { queryTaskCountByCategory } from '../../../api/flowable'
|
||||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -61,6 +64,11 @@ Page({
|
|||
name: '专项验收审批',
|
||||
icon: config.baseUrl + '/staticFiles/img/zxyssp.png',
|
||||
todoDB:0,
|
||||
}, {
|
||||
id: 9,
|
||||
name: '分包资质审批',
|
||||
icon: config.baseUrl + '/staticFiles/img/tzl.png',
|
||||
todoDB:0,
|
||||
}
|
||||
],
|
||||
},
|
||||
|
@ -75,27 +83,28 @@ Page({
|
|||
startDeptName,
|
||||
startUserName,
|
||||
procDefName,
|
||||
businessKeyName
|
||||
businessKeyName,
|
||||
category
|
||||
} = e.currentTarget.dataset.set
|
||||
if (taskName == "提交申请") {
|
||||
if (procDefKey == "flow_xmglzdl_qjspb") {
|
||||
wx.redirectTo({
|
||||
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
|
||||
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
} else {
|
||||
wx.redirectTo({
|
||||
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await`,
|
||||
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=await&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
//根据不同业务跳转不同表单
|
||||
if (procDefKey == "flow_xmglzdl_qjspb") {
|
||||
wx.redirectTo({
|
||||
url: `../approveLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
|
||||
url: `../approveLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
} else {
|
||||
wx.redirectTo({
|
||||
url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}`,
|
||||
url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -105,6 +114,11 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(!getToken()){
|
||||
wx.redirectTo({
|
||||
url: '../../login/index',
|
||||
})
|
||||
}
|
||||
let category;
|
||||
if(options && options.category){
|
||||
category = options.category;
|
||||
|
@ -141,12 +155,8 @@ Page({
|
|||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
let myProjects = this.selectComponent("#projectSel");
|
||||
myProjects.load();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-divider":"@vant/weapp/divider/index",
|
||||
"van-sidebar":"@vant/weapp/sidebar/index",
|
||||
"van-sidebar-item":"@vant/weapp/sidebar-item/index"
|
||||
"van-sidebar-item":"@vant/weapp/sidebar-item/index",
|
||||
"van-notice-bar": "@vant/weapp/notice-bar/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="gd_max" style="margin-top: 20rpx;">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="8" wx:for="{{typeList}}" wx:key="index">
|
||||
|
@ -25,6 +25,7 @@
|
|||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view style="padding-left: 30rpx;padding-right: 30rpx;"><van-notice-bar left-icon="https://szgcwx.jhncidg.com/staticFiles/icon/notice.png" text="发起审批申请时,请切换上方不同的申请类型,然后点击下方发起审批。暂不支持跨类型申请!" /></view>
|
||||
<van-divider content-position="left" :style="{padding:'90px 60px'}">
|
||||
{{categoryName}}
|
||||
</van-divider>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
/* pageage/project_checking_list/project_checking_list.wxss */
|
||||
.van-notice-bar{
|
||||
background-color: #25345f !important;
|
||||
}
|
||||
.gd_max{
|
||||
padding:10rpx 50rpx 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import config from '../../../config'
|
||||
import {
|
||||
getDictCache
|
||||
} from '../../../api/publics'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -38,7 +41,9 @@ Page({
|
|||
taskComType:"",
|
||||
fileType: ["pdf"],
|
||||
active: 100,
|
||||
rejectNode:false
|
||||
rejectNode:false,
|
||||
subDeptTypes: [],
|
||||
subDeptScopes: [],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -57,8 +62,12 @@ Page({
|
|||
userId,
|
||||
finishTime,
|
||||
ret,
|
||||
taskComType
|
||||
taskComType,
|
||||
procDefKey
|
||||
} = options
|
||||
if (procDefKey == "flow_fbzzsp_fbszzsp") {
|
||||
this.getDicts();
|
||||
}
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
|
@ -87,6 +96,40 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
//获取字典信息
|
||||
getDicts() {
|
||||
let that = this;
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
getDictCache('flow_sub_dept_type').then(res => {
|
||||
if (res.code == 200) {
|
||||
let typeList = [];
|
||||
res.data.forEach(item => {
|
||||
typeList.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
subDeptTypes: typeList
|
||||
})
|
||||
}
|
||||
});
|
||||
getDictCache('flow_sub_dept_scope').then(res => {
|
||||
if (res.code == 200) {
|
||||
let scopeList = [];
|
||||
res.data.forEach(item => {
|
||||
scopeList.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
subDeptScopes: scopeList
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getFlowNode(val) {
|
||||
let flowNodeList = this.data.flowNodeList;
|
||||
for (let i = 0; i < flowNodeList.length; i++) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!--pageage/safetyManagement/addSafetyInspect/index.wxml-->
|
||||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
|
@ -84,6 +84,71 @@
|
|||
<van-col span="18">{{nickName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list color_purple" wx:if="{{infoData.subDeptType}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text>分包类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<block wx:for="{{subDeptTypes}}" wx:key="index">
|
||||
<text wx:if="{{item.id==infoData.subDeptType}}">{{item.text}}</text>
|
||||
</block>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptScope}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">分包范围</text></van-col>
|
||||
<van-col span="18"><view>
|
||||
<block wx:for="{{format.split(infoData.subDeptScope,',')}}" wx:key="index">
|
||||
<block wx:for="{{subDeptScopes}}" wx:for-item="it" wx:key="idx" wx:for-index="itIdx">
|
||||
<text class="code_label_2 code_label_yellow" wx:if="{{item==it.id}}">{{it.text}}</text>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptName}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">分包单位</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptAptitude}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">分包资质</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptAptitude}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptChairman}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">法人代表</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptChairman}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptSafetyCertificate}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">安全证书</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptSafetyCertificate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodian}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">项目经理</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptCustodian}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptCustodianCardId}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">身份证号</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptCustodianCardId}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.subDeptApproachDate}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">进场时间</text></van-col>
|
||||
<van-col span="18">{{infoData.subDeptApproachDate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">审批事项</text></van-col>
|
||||
|
@ -94,7 +159,7 @@
|
|||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">审批内容</text></van-col>
|
||||
<van-col span="18">
|
||||
<view class="problem_list_info_con in-img-max" wx:if="{{imageList.length>0}}">
|
||||
<view class="inspect_info_content in-img-max" wx:if="{{imageList.length>0}}">
|
||||
<view class="in-img-div" wx:for="{{imageList}}" wx:key="index">
|
||||
<image bindtap='showImg' data-set="{{item}}" src='{{item.minPath}}'></image>
|
||||
</view>
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
|
||||
.problem_list_info_con{
|
||||
padding-right: 10rpx !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.problem_list_info_con .in-img-div{
|
||||
padding-right: 15rpx !important;
|
||||
}
|
||||
.code_label_2{
|
||||
padding: 8rpx 20rpx 8rpx 20rpx !important;
|
||||
margin-right: 15rpx;
|
||||
width: auto !important;
|
||||
display: inline-block;
|
||||
}
|
||||
.in-img-max:after{
|
||||
display:block;
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list" style="width: 100%;">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">请假时间</view>
|
||||
<view class="problem_list_info_con">
|
||||
<view class="inspect_info_content">
|
||||
<van-row>
|
||||
<van-col span="10">
|
||||
<voucher-date counts="5" maxDate="{{maxDate}}" placeholder="开始时间" bindchange="onbeginDate" time="{{beginDate}}"></voucher-date>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,8 @@
|
|||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
"van-collapse-item": "@vant/weapp/collapse-item",
|
||||
"van-notice-bar": "@vant/weapp/notice-bar/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -90,6 +90,63 @@
|
|||
{{procDefName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{subDeptTypes}}" selectValue="{{infoData.subDeptType}}" placeholder="请选择分包类型" bindchange="onSelectSubDeptTypes"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包范围</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-many-select columns="{{subDeptScopes}}" placeholder="请选择分包范围" bindchange="onSelectSubDeptScopes"></voucher-many-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包单位</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位名称" model:value="{{infoData.subDeptName}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptName" maxlength="50" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包资质</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位资质" model:value="{{infoData.subDeptAptitude}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptAptitude" maxlength="50" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">法人代表</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位法人代表" model:value="{{infoData.subDeptChairman}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptChairman" maxlength="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">安全证书</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位安全生产许可证" model:value="{{infoData.subDeptSafetyCertificate}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptSafetyCertificate" maxlength="50" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位项目经理" model:value="{{infoData.subDeptCustodian}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptCustodian" maxlength="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位项目经理身份证号" model:value="{{infoData.subDeptCustodianCardId}}" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptCustodianCardId" maxlength="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title">进场时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" placeholder="请选择分包单位进场时间" maxDate="{{maxDate}}" bindchange="inputSubDeptApproachDate" time="{{infoData.subDeptApproachDate}}"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{fbAptitude}}">
|
||||
<van-notice-bar left-icon="https://szgcwx.jhncidg.com/staticFiles/icon/notice.png" text="请至少上传报审表,营业执照,安全生产许可证,资质证书,人员证书等!缺少相关附件可能被驳回申请。" />
|
||||
</block>
|
||||
<view class="inspect_info_list" style="width: 100%;" wx:if="{{!isFiles || imageInfoData.length>0}}">
|
||||
<view class="inspect_info_title module_title_flex" style="padding: 20rpx 0 10rpx;">审批内容 [仅可上传图片]
|
||||
<view class="module_see_info_switct" bindtap="switchFiles" wx:if="{{filesData.length==0}}">
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
.van-popup{
|
||||
background: none !important;
|
||||
}
|
||||
.van-notice-bar{
|
||||
background-color: #25345f !important;
|
||||
}
|
||||
.van-image__img{
|
||||
border-radius: 10rpx !important;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import {
|
||||
getDictCache
|
||||
} from '../../../api/publics'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
|
@ -6,6 +9,7 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
maxDate: new Date(2088, 1, 1).getTime(),
|
||||
minDate: new Date(2001, 1, 1).getTime(),
|
||||
deptId: "",
|
||||
deptName: "",
|
||||
userId: "",
|
||||
|
@ -15,7 +19,7 @@ Page({
|
|||
projectName: "",
|
||||
remark: "",
|
||||
filesData: [],
|
||||
limit: 9,
|
||||
limit: 30,
|
||||
fileType: ["pdf", "png", "jpg", "jpeg"],
|
||||
procDefId: "",
|
||||
approveTitle: "",
|
||||
|
@ -26,6 +30,18 @@ Page({
|
|||
isFiles: false,
|
||||
imageInfoData: [],
|
||||
active: 0,
|
||||
fbAptitude: false,
|
||||
subDeptType: "",
|
||||
subDeptTypes: [],
|
||||
subDeptScope: "",
|
||||
subDeptScopes: [],
|
||||
subDeptName: "",
|
||||
subDeptAptitude: "",
|
||||
subDeptChairman: "",
|
||||
subDeptSafetyCertificate: "",
|
||||
subDeptCustodian: "",
|
||||
subDeptCustodianCardId: "",
|
||||
subDeptApproachDate: "",
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -35,8 +51,15 @@ Page({
|
|||
let {
|
||||
procDefId,
|
||||
approveTitle,
|
||||
deploymentId
|
||||
deploymentId,
|
||||
procDefKey
|
||||
} = options
|
||||
if (procDefKey == "flow_fbzzsp_fbszzsp") {
|
||||
this.getDicts();
|
||||
this.setData({
|
||||
fbAptitude: true
|
||||
})
|
||||
}
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
|
@ -66,6 +89,115 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
//获取字典信息
|
||||
getDicts() {
|
||||
let that = this;
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
getDictCache('flow_sub_dept_type').then(res => {
|
||||
if (res.code == 200) {
|
||||
let typeList = [];
|
||||
res.data.forEach(item => {
|
||||
typeList.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
subDeptTypes: typeList,
|
||||
subDeptType: typeList[0].id,
|
||||
})
|
||||
}
|
||||
});
|
||||
getDictCache('flow_sub_dept_scope').then(res => {
|
||||
if (res.code == 200) {
|
||||
let scopeList = [];
|
||||
res.data.forEach(item => {
|
||||
scopeList.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
subDeptScopes: scopeList,
|
||||
subDeptScope: scopeList[0].id,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//选择分包类型
|
||||
onSelectSubDeptTypes(e) {
|
||||
this.setData({
|
||||
subDeptType: e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
//选择分包范围
|
||||
onSelectSubDeptScopes(e) {
|
||||
let list = [];
|
||||
e.detail.forEach(it =>{
|
||||
if(it.id){
|
||||
list.push(it.id)
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
subDeptScope: list.toString()
|
||||
})
|
||||
},
|
||||
|
||||
//输入分包单位名称
|
||||
inputSubDeptName(e) {
|
||||
this.setData({
|
||||
subDeptName: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//输入分包单位资质
|
||||
inputSubDeptAptitude(e) {
|
||||
this.setData({
|
||||
subDeptAptitude: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//输入分包单位法人代表
|
||||
inputSubDeptChairman(e) {
|
||||
this.setData({
|
||||
subDeptChairman: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//输入分包单位安全证书
|
||||
inputSubDeptSafetyCertificate(e) {
|
||||
this.setData({
|
||||
subDeptSafetyCertificate: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//输入分包单位项目经理
|
||||
inputSubDeptCustodian(e) {
|
||||
this.setData({
|
||||
subDeptCustodian: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//输入分包单位名称
|
||||
inputSubDeptCustodianCardId(e) {
|
||||
this.setData({
|
||||
subDeptCustodianCardId: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//选择分包进场时间
|
||||
inputSubDeptApproachDate(e) {
|
||||
this.setData({
|
||||
subDeptApproachDate: e.detail
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取流程节点
|
||||
* @param {*} val
|
||||
*/
|
||||
getFlowNode(val) {
|
||||
let flowNodeList = this.data.flowNodeList;
|
||||
for (let i = 0; i < flowNodeList.length; i++) {
|
||||
|
@ -132,7 +264,17 @@ Page({
|
|||
userId,
|
||||
loginName,
|
||||
remark,
|
||||
filesData
|
||||
filesData,
|
||||
fbAptitude,
|
||||
subDeptType,
|
||||
subDeptScope,
|
||||
subDeptName,
|
||||
subDeptAptitude,
|
||||
subDeptChairman,
|
||||
subDeptSafetyCertificate,
|
||||
subDeptCustodian,
|
||||
subDeptCustodianCardId,
|
||||
subDeptApproachDate
|
||||
} = this.data;
|
||||
//数据效验
|
||||
if (projectId == "" || loginName == "" || userId == "" || procDefId == "") {
|
||||
|
@ -142,12 +284,71 @@ Page({
|
|||
})
|
||||
return;
|
||||
}
|
||||
if (remark == "") {
|
||||
app.toast("请填写申请说明!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
//分包资质审批数据效验
|
||||
if (fbAptitude) {
|
||||
if (subDeptType == "") {
|
||||
app.toast("请选择分包类型!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptScope == "") {
|
||||
app.toast("请选择分包范围!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptName == "") {
|
||||
app.toast("请填写分包单位名称!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptAptitude == "") {
|
||||
app.toast("请填写分包单位资质!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptChairman == "") {
|
||||
app.toast("请填写分包单位法人代表!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptSafetyCertificate == "") {
|
||||
app.toast("请填写分包单位安全生产许可证!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptCustodian == "") {
|
||||
app.toast("请填写分包单位项目经理!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptCustodianCardId == "") {
|
||||
app.toast("请填写分包单位项目经理身份证号!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (subDeptApproachDate == "") {
|
||||
app.toast("请选择分包单位进场时间!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (filesData.length == 0 && this.data.imageInfoData.length == 0) {
|
||||
app.toast("请上传审批内容!")
|
||||
|
@ -156,6 +357,13 @@ Page({
|
|||
});
|
||||
return;
|
||||
}
|
||||
if (remark == "") {
|
||||
app.toast("请填写申请说明!")
|
||||
this.setData({
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < filesData.length; i++) {
|
||||
let _fileType = filesData[0].path.split('.');
|
||||
_fileType = _fileType[_fileType.length - 1].toLowerCase();
|
||||
|
@ -198,7 +406,17 @@ Page({
|
|||
nickName,
|
||||
remark,
|
||||
filesData,
|
||||
imageInfoData
|
||||
imageInfoData,
|
||||
fbAptitude,
|
||||
subDeptType,
|
||||
subDeptScope,
|
||||
subDeptName,
|
||||
subDeptAptitude,
|
||||
subDeptChairman,
|
||||
subDeptSafetyCertificate,
|
||||
subDeptCustodian,
|
||||
subDeptCustodianCardId,
|
||||
subDeptApproachDate
|
||||
} = that.data;
|
||||
let fileUrls = [];
|
||||
filesData.forEach(f => {
|
||||
|
@ -212,6 +430,21 @@ Page({
|
|||
fileUrls.push(obj.data.fileName);
|
||||
//验证图片上传完毕
|
||||
if (fileUrls.length == imageInfoData.length) {
|
||||
//分包单位资质审批参数
|
||||
let fbAptitudeParams = {};
|
||||
if(fbAptitude){
|
||||
fbAptitudeParams = {
|
||||
subDeptType,
|
||||
subDeptScope,
|
||||
subDeptName,
|
||||
subDeptAptitude,
|
||||
subDeptChairman,
|
||||
subDeptSafetyCertificate,
|
||||
subDeptCustodian,
|
||||
subDeptCustodianCardId,
|
||||
subDeptApproachDate
|
||||
}
|
||||
}
|
||||
let params = {
|
||||
procDefId,
|
||||
userId,
|
||||
|
@ -222,6 +455,7 @@ Page({
|
|||
projectName,
|
||||
files: fileUrls.toString(),
|
||||
remark,
|
||||
...fbAptitudeParams
|
||||
}
|
||||
}
|
||||
wx.request({
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
"van-collapse-item": "@vant/weapp/collapse-item",
|
||||
"van-notice-bar": "@vant/weapp/notice-bar/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -46,6 +46,63 @@
|
|||
{{approveTitle}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{subDeptTypes}}" placeholder="请选择分包类型" bindchange="onSelectSubDeptTypes"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包范围</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-many-select columns="{{subDeptScopes}}" placeholder="请选择分包范围" bindchange="onSelectSubDeptScopes"></voucher-many-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包单位</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位名称" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptName" maxlength="50" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">分包资质</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位资质" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptAptitude" maxlength="50" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">法人代表</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位法人代表" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptChairman" maxlength="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">安全证书</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位安全生产许可证" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptSafetyCertificate" maxlength="50" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位项目经理" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptCustodian" maxlength="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写分包单位项目经理身份证号" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" bindinput="inputSubDeptCustodianCardId" maxlength="20" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{fbAptitude}}">
|
||||
<view class="inspect_info_title">进场时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" placeholder="请选择分包单位进场时间" minDate="{{minDate}}" maxDate="{{maxDate}}" bindchange="inputSubDeptApproachDate"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{fbAptitude}}">
|
||||
<van-notice-bar left-icon="https://szgcwx.jhncidg.com/staticFiles/icon/notice.png" text="请至少上传报审表,营业执照,安全生产许可证,资质证书,人员证书等!缺少相关附件可能被驳回申请。" />
|
||||
</block>
|
||||
<view class="inspect_info_list" style="width: 100%;" wx:if="{{!isFiles}}">
|
||||
<view class="inspect_info_title module_title_flex" style="padding: 20rpx 0 10rpx;">审批内容 [仅可上传图片]
|
||||
<view class="module_see_info_switct" bindtap="switchFiles">
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
.van-popup{
|
||||
background: none !important;
|
||||
}
|
||||
.van-notice-bar{
|
||||
background-color: #25345f !important;
|
||||
}
|
||||
.van-image__img{
|
||||
border-radius: 10rpx !important;
|
||||
}
|
||||
|
|
|
@ -19,14 +19,14 @@ Page({
|
|||
},
|
||||
|
||||
addInfo(e){
|
||||
let {id,name,deploymentId,flowKey} = e.currentTarget.dataset.set
|
||||
let {id,name,deploymentId,flowKey,category} = e.currentTarget.dataset.set
|
||||
if(flowKey=="flow_xmglzdl_qjspb"){
|
||||
wx.redirectTo({
|
||||
url: `../initLeaveTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}`,
|
||||
url: `../initLeaveTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}&procDefKey=${flowKey}&category=${category}`,
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: `../initTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}`,
|
||||
url: `../initTask/index?procDefId=${id}&approveTitle=${name}&deploymentId=${deploymentId}&procDefKey=${flowKey}&category=${category}`,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">{{item.categoryName}}<text class="timeline_for_state_1">{{' v '+item.version}}</text></view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">{{item.categoryName}}<text class="timeline_for_state_1">{{' 流程版本v '+item.version}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
|
|
|
@ -49,29 +49,29 @@ Page({
|
|||
},
|
||||
|
||||
getInfo(e){
|
||||
let {deployId,procInsId,taskId,taskName,procDefKey,startDeptName,startUserName,procDefName,businessKeyName,finishTime,taskComType} = e.currentTarget.dataset.set
|
||||
let {deployId,procInsId,taskId,taskName,procDefKey,startDeptName,startUserName,procDefName,businessKeyName,finishTime,taskComType,category} = e.currentTarget.dataset.set
|
||||
if(!finishTime){
|
||||
finishTime="";
|
||||
}
|
||||
if(taskName=="提交申请"){
|
||||
if(procDefKey=="flow_xmglzdl_qjspb"){
|
||||
wx.redirectTo({
|
||||
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess`,
|
||||
url: `../editLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess`,
|
||||
url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&ret=myProcess&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
}
|
||||
}else{
|
||||
//根据不同业务跳转不同表单
|
||||
if(procDefKey=="flow_xmglzdl_qjspb"){
|
||||
wx.redirectTo({
|
||||
url: `../detailLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}`,
|
||||
url: `../detailLeaveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}`,
|
||||
url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&projectName=${businessKeyName}&finishTime=${finishTime}&ret=myProcess&taskComType=${taskComType}&procDefKey=${procDefKey}&category=${category}`,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_data_prop color_orange">项目名称:{{item.businessKeyName}}</view>
|
||||
<view class="inspect_list_info_data_prop color_blue">审批事项:{{item.procDefName}} {{' v'+item.procDefVersion}}</view>
|
||||
<view class="inspect_list_info_data_prop color_blue">审批事项:{{item.procDefName}}
|
||||
<text class="code_label_2 code_label_green">{{' 流程版本v'+item.procDefVersion}}</text></view>
|
||||
<view class="inspect_list_info_data_prop">流程类别:<text wx:if="{{item.category=='1'}}">程序及质量类</text><text wx:if="{{item.category=='2'}}">安全类</text><text wx:if="{{item.category=='3'}}">认价类</text><text wx:if="{{item.category=='4'}}">图纸类</text><text wx:if="{{item.category=='5'}}">项目管理制度类</text><text wx:if="{{item.category=='6'}}">索赔类</text><text wx:if="{{item.category=='7'}}">特殊事项确认类</text><text wx:if="{{item.category=='8'}}">专项验收审批</text></view>
|
||||
<view class="inspect_list_info_data_prop">当前节点:<text wx:if="{{item.finishTime == null}}">{{item.taskName}}</text>
|
||||
<text wx:if="{{item.finishTime != null}}">流程结束</text>
|
||||
|
|
|
@ -15,9 +15,8 @@ Page({
|
|||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
//config.manageUrl +
|
||||
this.setData({
|
||||
url:"https://szgcwx.jhncidg.com/wechat/wxAuth/authorize?userOpenId=" + res.data.openId
|
||||
url:config.baseUrl+"/wechat/wxAuth/authorize?userOpenId=" + res.data.openId
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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