diff --git a/pages/projectEnd/dangerBigProject/addFinallyAcceptance.vue b/pages/projectEnd/dangerBigProject/addFinallyAcceptance.vue index b70cc434..aee795fd 100644 --- a/pages/projectEnd/dangerBigProject/addFinallyAcceptance.vue +++ b/pages/projectEnd/dangerBigProject/addFinallyAcceptance.vue @@ -7,6 +7,10 @@ + + 危大工程 + {{engineeringName}} + *验收单位 @@ -28,8 +32,8 @@ *验收时间 @@ -39,7 +43,7 @@ - 保存 + 提交验收申请 @@ -52,38 +56,26 @@ }, data(){ return{ + engineeringId: '', + //验收人相关属性 acceptanceIndex: '', acceptancePerson: '', acceptancePersonList: [], + //验收单位相关属性 enterpriseId: '', enterpriseIndex: '', enterpriseInfoList: [], projectSn: '', isDisabled: false, - acceptanceTime: '', + planTime: '', statusBarHeight: 0, title: "下发验证任务", inspectTime:'', - formData:{ - acceptanceRegion: "", - acceptanceDescribe: "", - imgFileList:[], - acceptanceResult: 1, - acceptanceType: "", - dangerousEngineeringId: "" - }, - textareaLengh: 0, - typeIndex: "", - typeList:[{ - id: 1, - name: '施工条件验收' - },{ - id: 2, - name: '危大工程验收' - }] + + userInfo: {} } }, created() { @@ -93,8 +85,13 @@ this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight; }, onLoad(val){ + console.log("========================"); + console.log(val); + console.log("========================"); this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn - this.formData.dangerousEngineeringId = val.id + this.userInfo = JSON.parse(uni.getStorageSync('userInfo')) + this.engineeringId = val.id + this.engineeringName = val.name this.getEnterpriseInfoList() }, watch:{ @@ -131,36 +128,42 @@ uni.hideLoading() console.log("xmgl/xzDangerousEngineeringAcceptance/list",res); this.enterpriseInfoList = res.result; - - } }) }, saveForm(){ - // console.log(this.formData) let data = { - aaa: this.formData.acceptanceDescribe, - bbb: this.formData.acceptanceRegion, - ccc: this.formData.acceptanceResult, + projectSn: this.projectSn, + engineeringId: this.engineeringId, //危大工程Id + //申请验收相关属性 + applyAcceptanceUnitId: this.userInfo.userEnterpriseId, //申请验收单位id + applyAcceptanceUserId: this.userInfo.userId, //申请验收人id + //验收相关属性 + acceptanceUnitId: this.enterpriseId, + acceptanceUserId: this.acceptancePerson.userId, + planTime: this.planTime, } - data.createUser = JSON.parse(uni.getStorageSync('userInfo')).userId; - let arr = [] - this.formData.imgFileList.forEach(item=>{ - arr.push(item.url) - }) - data.imageUrl = arr.join(',') - if(data.acceptanceType == ""){ + console.log(data); + if(!data.acceptanceUnitId){ uni.showToast({ - title: '请选择验收类型!', + title: '请选择验收单位', icon: "none", duration: 2000 }); return; } - if(data.acceptanceRegion == ""){ + if(!data.acceptanceUserId){ uni.showToast({ - title: '请输入验收部位!', + title: '请选择验收人', + icon: "none", + duration: 2000 + }); + return; + } + if(!data.planTime){ + uni.showToast({ + title: '请选择验收时间', icon: "none", duration: 2000 }); @@ -168,7 +171,7 @@ } console.log(data) this.sendRequest({ - url:'xmgl/dangerousEngineeringAcceptanceCheck/add', + url:'xmgl/xzDangerousEngineeringAcceptance/add', method:'post', data: data, success:res=>{ @@ -183,6 +186,19 @@ } }) }, + + + bindPickerChange(e){ + this.planTime = e.f3 + }, + bindPickerChangePerson(e){ + this.acceptanceIndex = e.target.value + this.acceptancePerson = this.acceptancePersonList[e.target.value] + }, + bindPickerChangeEnterprise(e){ + this.enterpriseIndex = e.target.value + this.enterpriseId = this.enterpriseInfoList[e.target.value].id + }, getNowTime() { let dateTime let yy = new Date().getFullYear() @@ -194,23 +210,6 @@ dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss console.log(dateTime) return dateTime - }, - - bindPickerChange(e){ - this.acceptanceTime = e.f3 - console.log(this.acceptanceTime); - console.log("timetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetimetime"); - console.log(e); - }, - bindPickerChangePerson(e){ - this.acceptanceIndex = e.target.value - this.acceptancePerson = this.typeList[e.target.value] - }, - bindPickerChangeEnterprise(e){ - this.enterpriseIndex = e.target.value - this.enterpriseId = this.enterpriseInfoList[e.target.value].id - console.log("======================================================="); - console.log(this.enterpriseId); } } } diff --git a/pages/projectEnd/dangerBigProject/backlogList.vue b/pages/projectEnd/dangerBigProject/backlogList.vue index 5e0da13a..96481c99 100644 --- a/pages/projectEnd/dangerBigProject/backlogList.vue +++ b/pages/projectEnd/dangerBigProject/backlogList.vue @@ -5,23 +5,29 @@ {{title}} - + - 危大工程名称:ssss + 危大工程名称:{{item.engineeringName}} - 待确认 + 待确认 + 合格 + 不合格 - 计划执行时间:ssss + 计划执行时间:{{item.planTime}} - 申请验收单位:ssss + 申请验收单位:{{item.applyAcceptanceUnitName}} - 申请验收人:ssss + 申请验收人:{{item.applyAcceptanceUserName}} + + + 暂无数据 + @@ -30,13 +36,46 @@ data() { return { title: "查看待办", + listData: [], + projectSn: '', + userInfo: {}, }; }, + created() { + + }, + onLoad() { + this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn + this.userInfo = JSON.parse(uni.getStorageSync('userInfo')) + this.initData() + }, methods:{ - jobTrial(){ + initData(){ + this.sendRequest({ + url:'xmgl/xzDangerousEngineeringAcceptance/list', + method:'get', + data:{ + projectSn: this.projectSn, + acceptanceUserId: this.userInfo.userId + }, + success:res=>{ + uni.hideLoading() + this.listData = res.result + } + }) + }, + jobTrial(item){ console.log('sssssss'); + let checkRecord = { + id: item.id, + engineeringName: item.engineeringName, + planTime: item.planTime, + applyAcceptanceUnitName: item.applyAcceptanceUnitName, + applyAcceptanceUserName: item.applyAcceptanceUserName + } + checkRecord = item uni.navigateTo({ - url:'./backlogTrial/backlogTrial' + url:'./backlogTrial/backlogTrial?checkRecord='+encodeURIComponent(JSON.stringify(checkRecord)) }) } } @@ -67,6 +106,20 @@ } } } + .no-data{ + text-align: center; + .img{ + display: block; + height: 200rpx; + width: 200rpx; + margin: 0 auto; + margin-top: 60rpx; + margin-bottom: 60rpx; + } + .txt{ + color: #C0C4CC; + } + } .backlogMargin{ margin-bottom: 15px; diff --git a/pages/projectEnd/dangerBigProject/backlogTrial/backlogTrial.vue b/pages/projectEnd/dangerBigProject/backlogTrial/backlogTrial.vue index 0583a15b..400996d2 100644 --- a/pages/projectEnd/dangerBigProject/backlogTrial/backlogTrial.vue +++ b/pages/projectEnd/dangerBigProject/backlogTrial/backlogTrial.vue @@ -8,10 +8,10 @@ - 危大工程名称: - 计划执行时间: - 申请验收单位: - 申请验收人: + 危大工程名称:{{checkRecord.engineeringName}} + 计划执行时间:{{checkRecord.planTime}} + 申请验收单位:{{checkRecord.applyAcceptanceUnitName}} + 申请验收人:{{checkRecord.applyAcceptanceUserName}} *验收结果 @@ -49,13 +49,20 @@ 确 认 - + + 弹窗内容 这里是弹窗的内容 关闭弹窗 - + --> + + + + + + + @@ -63,8 +70,11 @@ export default { data() { return { + unitDialog: false, + checkRecord: {}, //验收记录 + statusBarHeight: 0, - isPopupVisible: false, + isPopupVisible: true, title: "新增验收记录", formData: { acceptanceRegion: "", @@ -89,7 +99,11 @@ this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight; }, onLoad(val) { - this.formData.dangerousEngineeringId = val.id + // this.formData.dangerousEngineeringId = val.id + this.checkRecord = JSON.parse(decodeURIComponent(val.checkRecord)); + console.log("===============onload==================="); + console.log(this.checkRecord); + console.log("===============onload==================="); }, methods: { checkRadio(val) { @@ -149,7 +163,6 @@ }) that.videoFileList = fileArr; } - } else if (res.cancel) { console.log('用户点击取消'); } @@ -171,13 +184,16 @@ saveForm() { // console.log(this.formData) this.isPopupVisible = true - // let data = { - // acceptanceDescribe: this.formData.acceptanceDescribe, - // acceptanceRegion: this.formData.acceptanceRegion, - // acceptanceResult: this.formData.acceptanceResult, - // acceptanceType: this.formData.acceptanceType, - // dangerousEngineeringId: this.formData.dangerousEngineeringId - // } + this.unitDialog = true + let data = { + id: this.checkRecord.id, + acceptanceResult: this.formData.acceptanceResult, //验收结果 + acceptanceDesc: this.formData.acceptanceDescribe, //验收描述 + photo: this.formData.imgFileList[0].url + } + console.log("==============================="); + console.log(data); + console.log("==============================="); // data.createUser = JSON.parse(uni.getStorageSync('userInfo')).userId; // let arr = [] // this.formData.imgFileList.forEach(item=>{ @@ -186,7 +202,7 @@ // data.imageUrl = arr.join(',') // console.log(data) // this.sendRequest({ - // url:'xmgl/dangerousEngineeringAcceptanceCheck/add', + // url:'xmgl/xzDangerousEngineeringAcceptance/edit', // method:'post', // data: data, // success:res=>{ @@ -391,4 +407,21 @@ .backlogMargin { margin-bottom: 15px; } + .dialog-container { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 111; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + .dialog-content{ + width: 80%; + height: 500rpx; + background-color: #fff; + } + } \ No newline at end of file diff --git a/pages/projectEnd/dangerBigProject/details.vue b/pages/projectEnd/dangerBigProject/details.vue index 277317c4..8d4c2b97 100644 --- a/pages/projectEnd/dangerBigProject/details.vue +++ b/pages/projectEnd/dangerBigProject/details.vue @@ -107,10 +107,10 @@ },{ id: 2, name: "工程资料" - },{ + },/*{ id: 3, name: "一般验收" - },/*{ + },{ id: 4, name: "验收表验收" },*/{ @@ -230,7 +230,7 @@ } else if(this.activeIndex == 8){ uni.navigateTo({ - url:'./addFinallyAcceptance?id='+this.detailId + url:'./addFinallyAcceptance?id='+this.detailId+'&name='+this.detailData.engineeringName }) } } diff --git a/pages/projectEnd/dangerBigProject/finallyAcceptance.vue b/pages/projectEnd/dangerBigProject/finallyAcceptance.vue index dd7d5479..c5824ddb 100644 --- a/pages/projectEnd/dangerBigProject/finallyAcceptance.vue +++ b/pages/projectEnd/dangerBigProject/finallyAcceptance.vue @@ -23,7 +23,7 @@