ソースを参照

民用工程增加工程完毕不可新增逻辑

zhnghongrui 1 年間 前
コミット
b7d2cf31f5

+ 70 - 3
pages/oldrenovation/courtyard/courtyard.vue

@@ -174,7 +174,8 @@
 						<view class="container" style="color: #b2b2b2;">*请上传照片</view>
 						<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
 							<image src="/static/images/updateimg.png" mode=""
-								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"></image>
+								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"
+								v-show="reviewStatus!='1'"></image>
 							<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
 								<view
 									v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
@@ -195,7 +196,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="action-btn">
+			<view class="action-btn" v-show="reviewStatus!='1'">
 				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
 
@@ -241,6 +242,7 @@
 					},
 
 					type: '',
+					reviewStatus: '', //是否可以点击
 					open: false,
 					objValue: '', //上一页面传过来的值  新增接口用
 					openDict: false,
@@ -609,6 +611,12 @@
 
 					} else if (this.type == 'gczq') {
 						this.projectValue = item
+						if (!this.isEmpty(this.XQValue.id)) {
+
+							//房间选完 判断 工程周期  工程周期切换
+							this.getStatus();
+
+						}
 
 					} else if (this.type == 'xzq') {
 						this.XZQValue = item;
@@ -639,6 +647,12 @@
 
 					} else if (this.type == 'xq') {
 						this.XQValue = item;
+						if (!this.isEmpty(this.projectValue.dictValue)) {
+
+							//小区选完 判断 工程周期
+							this.getStatus();
+
+						}
 						//根据小区id 获取楼栋数据
 						this.LDValue = ''; //重置楼栋数据
 						this.DYValue = ''; //重置单元数据
@@ -649,6 +663,12 @@
 						})
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
+						if (!this.isEmpty(this.projectValue.dictValue)) {
+
+							//楼栋选完 判断 工程周期
+							this.getStatus();
+
+						}
 
 					}
 				},
@@ -660,6 +680,52 @@
 				closeDict(e) {
 					this.openDict = false
 				},
+				getStatus() {
+					let unitId = '';
+					let houseId = '';
+					let buildingId = '';
+					if (this.isEmpty(this.LDValue.id)) {
+						buildingId = '';
+					} else {
+						buildingId = this.LDValue.id
+					}
+					let param = {
+						areaId: this.XQValue.id, // 小区id
+						buildingId: buildingId, // 楼宇id
+						unitId: unitId,
+						houseId: houseId, //传空
+						enginCycle: this.projectValue.dictValue, // 工程周期
+						enginType: this.objValue.enginType, //写死 上一页面传过来的
+						enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+					}
+
+
+					getRoomProjectId(param).then(res => {
+
+						if (res.code == '200') {
+
+							if (res.data != null && res.data.zEngineeringNodeBoList != null) {
+
+								res.data.zEngineeringNodeBoList.forEach((item, index) => {
+									if (this.objValue.enginClassValue == item.type) {
+										this.reviewStatus = item.reviewStatus;
+										if (item.reviewStatus == '1')
+											this.$modal.msg('当前工程已结束')
+									}
+
+								})
+
+
+							} else {
+								this.reviewStatus = '' //置空
+							}
+
+						} else {
+							this.$modal.msg(res.msg)
+							this.reviewStatus = '' //置空
+						}
+					})
+				},
 				//提交数据
 				submit() {
 
@@ -887,9 +953,10 @@
 			font-weight: 400;
 			color: #FFFFFF;
 			line-height: 69rpx;
-			margin-top:40rpx;
+			margin-top: 40rpx;
 			margin-bottom: 100rpx;
 		}
+
 		.number {
 			display: flex;
 			/* 水平居中显示子元素 */

+ 78 - 13
pages/oldrenovation/indoor/indoor.vue

@@ -156,7 +156,7 @@
 					<view class="uni-list">
 						<view
 							style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
-							拆旧管111
+							拆旧管
 							<span
 								style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 10px;"
 								@click="history">历史</span>
@@ -424,7 +424,8 @@
 					<view class="container" style="color: #b2b2b2;">*请上传照片</view>
 					<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
 						<image src="/static/images/updateimg.png" mode=""
-							style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"></image>
+							style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"
+							v-show="reviewStatus!='1'"></image>
 						<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
 							<view
 								v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
@@ -445,7 +446,7 @@
 
 				</view>
 			</view>
-			<view class="action-btn">
+			<view class="action-btn" v-show="reviewStatus!='1'">
 				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
 
@@ -476,6 +477,9 @@
 		import {
 			getToken
 		} from '../../../utils/auth';
+		import {
+			showConfirm
+		} from '../../../utils/common';
 
 		export default {
 			components: {
@@ -490,6 +494,7 @@
 					},
 					type: '',
 					open: false,
+					reviewStatus: '', //是否可以点击
 					objValue: '', //上一页面传过来的值  新增接口用
 					openDict: false,
 					selectList: [],
@@ -778,6 +783,7 @@
 						getDicts("engin_cycle").then(response => {
 							this.dictOptions = response.data;
 						});
+
 					} else if (e == 'xzq') { //行政区
 						if (this.isEmpty(this.projectValue.dictValue)) {
 							this.$modal.msg('请选择工程周期')
@@ -846,7 +852,12 @@
 
 					} else if (this.type == 'gczq') {
 						this.projectValue = item
+						if (!this.isEmpty(this.FJValue.id)) {
+
+							//房间选完 判断 工程周期  工程周期切换
+							this.getStatus();
 
+						}
 					} else if (this.type == 'xzq') {
 						this.XZQValue = item;
 
@@ -906,6 +917,15 @@
 						})
 					} else if (this.type == 'fj') {
 						this.FJValue = item;
+
+						if (!this.isEmpty(this.projectValue.dictValue)) {
+
+							//房间选完 判断 工程周期
+							this.getStatus();
+
+						}
+
+
 					}
 
 				},
@@ -917,6 +937,44 @@
 				closeDict(e) {
 					this.openDict = false
 				},
+				getStatus() {
+					let param = {
+						areaId: this.XQValue.id, // 小区id
+						buildingId: this.LDValue.id, // 楼宇id
+						unitId: this.DYValue.id, // 单元id
+						houseId: this.FJValue.id, // 房间id
+						enginCycle: this.projectValue.dictValue, // 工程周期
+						enginType: this.objValue.enginType, //写死 上一页面传过来的
+						enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+					}
+
+
+					getRoomProjectId(param).then(res => {
+
+						if (res.code == '200') {
+
+							if (res.data != null && res.data.zEngineeringNodeBoList != null) {
+
+								res.data.zEngineeringNodeBoList.forEach((item, index) => {
+									if (this.objValue.enginClassValue == item.type) {
+										this.reviewStatus = item.reviewStatus;
+										if (item.reviewStatus == '1')
+											this.$modal.msg('当前工程已结束')
+									}
+
+								})
+
+
+							} else {
+								this.reviewStatus = '' //置空
+							}
+
+						} else {
+							this.$modal.msg(res.msg)
+							this.reviewStatus = '' //置空
+						}
+					})
+				},
 				//提交数据
 				submit() {
 
@@ -986,7 +1044,8 @@
 						} else if (this.loading == false) {
 							this.$modal.msg('照片或视频未上传完毕,无法提交!')
 						} else {
-							const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith('.png') || item
+							const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
+									'.png') || item
 								.endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
 								.endsWith('.JPEG'));
 							const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
@@ -1000,7 +1059,8 @@
 									unitId: this.DYValue.id,
 									houseId: this.FJValue.id,
 									enginType: this.objValue.enginType, //写死 上一页面传过来的 
-									enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+									enginClassification: this.objValue
+										.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
 									enginCycle: this.projectValue.dictValue, //工程周期
 									zEngineeringNodeBo: {
 										type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
@@ -1061,7 +1121,8 @@
 					} else {
 						//提交
 						let param = ';'
-						if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue == '打孔') { //拆旧管  打孔
+						if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue ==
+							'打孔') { //拆旧管  打孔
 							param = {
 								district: this.XZQValue.dictValue,
 								areaId: this.XQValue.id,
@@ -1069,7 +1130,8 @@
 								unitId: this.DYValue.id,
 								houseId: this.FJValue.id,
 								enginType: this.objValue.enginType, //写死 上一页面传过来的 
-								enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+								enginClassification: this.objValue
+									.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
 								enginCycle: this.projectValue.dictValue, //工程周期
 								zEngineeringNodeBo: {
 									type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
@@ -1093,7 +1155,8 @@
 								unitId: this.DYValue.id,
 								houseId: this.FJValue.id,
 								enginType: this.objValue.enginType, //写死 上一页面传过来的 
-								enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+								enginClassification: this.objValue
+									.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
 								enginCycle: this.projectValue.dictValue, //工程周期
 								zEngineeringNodeBo: {
 									type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
@@ -1118,7 +1181,8 @@
 								unitId: this.DYValue.id,
 								houseId: this.FJValue.id,
 								enginType: this.objValue.enginType, //写死 上一页面传过来的 
-								enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+								enginClassification: this.objValue
+									.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
 								enginCycle: this.projectValue.dictValue, //工程周期
 								zEngineeringNodeBo: {
 									type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
@@ -1145,7 +1209,8 @@
 								unitId: this.DYValue.id,
 								houseId: this.FJValue.id,
 								enginType: this.objValue.enginType, //写死 上一页面传过来的 
-								enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+								enginClassification: this.objValue
+									.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
 								enginCycle: this.projectValue.dictValue, //工程周期
 								zEngineeringNodeBo: {
 									type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
@@ -1169,7 +1234,8 @@
 								unitId: this.DYValue.id,
 								houseId: this.FJValue.id,
 								enginType: this.objValue.enginType, //写死 上一页面传过来的 
-								enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+								enginClassification: this.objValue
+									.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
 								enginCycle: this.projectValue.dictValue, //工程周期
 								zEngineeringNodeBo: {
 									type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
@@ -1346,5 +1412,4 @@
 			min-height: 100upx;
 			line-height: 20px;
 		}
-	</style>
-	
+	</style>

+ 66 - 3
pages/oldrenovation/overhead/overhead.vue

@@ -195,7 +195,8 @@
 						<view class="container" style="color: #b2b2b2;">*请上传照片</view>
 						<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
 							<image src="/static/images/updateimg.png" mode=""
-								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"></image>
+								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"
+								v-show="reviewStatus!='1'"></image>
 							<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
 								<view
 									v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
@@ -216,7 +217,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="action-btn">
+			<view class="action-btn" v-show="reviewStatus!='1'">
 				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
 
@@ -260,7 +261,7 @@
 					headers: {
 						Authorization: "Bearer " + getToken()
 					},
-
+					reviewStatus: '', //是否可以点击
 					startDate: '2022-02-04',
 					endDate: '2025-02-04',
 					mode: 4,
@@ -643,6 +644,12 @@
 
 					} else if (this.type == 'gczq') {
 						this.projectValue = item
+						if (!this.isEmpty(this.LDValue.id)) {
+
+							//  工程周期切换
+							this.getStatus();
+
+						}
 
 					} else if (this.type == 'xzq') {
 						this.XZQValue = item;
@@ -684,6 +691,11 @@
 						})
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
+						if (!this.isEmpty(this.projectValue.dictValue)) {
+
+							this.getStatus();
+
+						}
 						//根据楼栋ID 获取单元数据
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
@@ -694,6 +706,11 @@
 
 					} else if (this.type == 'dy') {
 						this.DYValue = item;
+						if (!this.isEmpty(this.projectValue.dictValue)) {
+
+							this.getStatus();
+
+						}
 					}
 				},
 				//关闭弹窗
@@ -704,6 +721,52 @@
 				closeDict(e) {
 					this.openDict = false
 				},
+				getStatus() {
+					let unitId = '';
+					let houseId = '';
+					if (this.isEmpty(this.DYValue.id)) {
+						unitId = '';
+					} else {
+						unitId = this.DYValue.id
+					}
+
+					let param = {
+						areaId: this.XQValue.id, // 小区id
+						buildingId: this.LDValue.id, // 楼宇id
+						unitId: unitId, // 单元id
+						houseId: houseId, // 房间id
+						enginCycle: this.projectValue.dictValue, // 工程周期
+						enginType: this.objValue.enginType, //写死 上一页面传过来的
+						enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+					}
+
+
+					getRoomProjectId(param).then(res => {
+
+						if (res.code == '200') {
+
+							if (res.data != null && res.data.zEngineeringNodeBoList != null) {
+
+								res.data.zEngineeringNodeBoList.forEach((item, index) => {
+									if (this.objValue.enginClassValue == item.type) {
+										this.reviewStatus = item.reviewStatus;
+										if (item.reviewStatus == '1')
+											this.$modal.msg('当前工程已结束')
+									}
+
+								})
+
+
+							} else {
+								this.reviewStatus = '' //置空
+							}
+
+						} else {
+							this.$modal.msg(res.msg)
+							this.reviewStatus = '' //置空
+						}
+					})
+				},
 				//提交数据
 				submit() {