浏览代码

旧改下沟暂存

zhanghongrui 9 月之前
父节点
当前提交
1956989cce
共有 2 个文件被更改,包括 157 次插入84 次删除
  1. 116 52
      pages/oldrenovation/courtyard/courtyard.vue
  2. 41 32
      pages/oldrenovation/indoor/indoor.vue

+ 116 - 52
pages/oldrenovation/courtyard/courtyard.vue

@@ -52,24 +52,19 @@
 
 
 
-				<SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
-					subtitleKey="id" v-model="name"></SelectPicker>
+				<SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name" subtitleKey="id" v-model="name"></SelectPicker>
 
 
-				<SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
-					titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
+				<SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict" titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
 			</view>
 
 			<view class="background">
 				<view>
 					<view class="uni-list">
-						<view
-							style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
+						<view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
 							{{objValue.enginClassValue}}
 
-							<span
-								style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 10px;"
-								@click="history">历史</span>
+							<span style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 10px;" @click="history">{{historyName}}</span>
 						</view>
 						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
 
@@ -87,10 +82,7 @@
 							<view class="uni-common-mt" style="width: 100%;">
 								<text class="uni-title uni-common-pl">施工内容</text>
 								<view style="width: 100%;box-sizing: border-box;">
-									<textarea class="textarea" placeholder="请输入施工内容" maxlength="255"
-										placeholder-style="padding: 10rpx;"
-										style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
-										auto-height v-model="projectContent"></textarea>
+									<textarea class="textarea" placeholder="请输入施工内容" maxlength="255" placeholder-style="padding: 10rpx;" style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;" auto-height v-model="projectContent"></textarea>
 								</view>
 							</view>
 						</view>
@@ -121,13 +113,9 @@
 							<view class="container" style="border-bottom: 1px solid #f8f8f8;">
 								<text>米 数</text>
 								<view style="display: flex; justify-content: right; width: 70%;">
-									<input class="uni-input" type="number" v-model="a.sl.inputIntegerNumberValue"
-										maxlength="6"
-										style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
+									<input class="uni-input" type="number" v-model="a.sl.inputIntegerNumberValue" maxlength="6" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
 									<text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
-									<input class="uni-input" type="number" v-model="a.sl.inputDecimalNumberValue"
-										maxlength="1"
-										style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
+									<input class="uni-input" type="number" v-model="a.sl.inputDecimalNumberValue" maxlength="1" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
 								</view>
 							</view>
 							<button v-if="index!=0" @click="this.czggslList.splice(index,1)" class="sc-btn">删除</button>
@@ -165,21 +153,16 @@
 					<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
 						<view class="container" style="color: #b2b2b2;">*请上传管上皮深度测量照片</view>
 						<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
-							<image :src="loadImgSrc('updateimg.png')" mode=""
-								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('gspsdcl')"
-								v-show="reviewStatus!='1'"></image>
+							<image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('gspsdcl')" v-show="reviewStatus!='1'"></image>
 							<view v-for="(item,index) in imgGuanArr" :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' ">
-									<image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
-										@click="showPhoto(index,'gspsdcl')">
+								<view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
+									<image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'gspsdcl')">
 									</image>
 								</view>
 								<view v-else>
 									<video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
 								</view>
-								<view @click="remove(index,'gspsdcl')"
-									style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+								<view @click="remove(index,'gspsdcl')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
 									<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
 									</image>
 								</view>
@@ -189,21 +172,16 @@
 						<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
 							<view class="container" style="color: #b2b2b2;">*请上传管沟远景照片</view>
 							<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
-								<image :src="loadImgSrc('updateimg.png')" mode=""
-									style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('ggyj')"
-									v-show="reviewStatus!='1'"></image>
+								<image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('ggyj')" 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' ">
-										<image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
-											@click="showPhoto(index,'ggyj')">
+									<view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
+										<image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'ggyj')">
 										</image>
 									</view>
 									<view v-else>
 										<video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
 									</view>
-									<view @click="remove(index,'ggyj')"
-										style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+									<view @click="remove(index,'ggyj')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
 										<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
 										</image>
 									</view>
@@ -213,16 +191,13 @@
 							<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
 								<view class="container" style="color: #b2b2b2;">*请上传视频</view>
 								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
-									<image :src="loadImgSrc('updateimg.png')" mode=""
-										style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('video')"
-										v-show="reviewStatus!='1'"></image>
+									<image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('video')" v-show="reviewStatus!='1'"></image>
 									<view v-for="(item,index) in videoArr" :key="index" style="position: relative;">
 
 
 										<video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
 
-										<view @click="remove(index,'video')"
-											style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+										<view @click="remove(index,'video')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
 											<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
 											</image>
 										</view>
@@ -234,12 +209,12 @@
 				</view>
 			</view>
 			<view class="action-btn" v-show="reviewStatus!='1'">
-				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
+				<button @click="submit('submit')" class="btn cu-btn block bg-blue lg round">确认上传</button>
+				<button @click="submit('save')" class="btn cu-btn block bg-blue lg round" v-if="objValue.enginType == 'old_renovation'">暂存</button>
 			</view>
 
 			<bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.enginClassValue"></bottom-sheet>
-			<yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
-				:time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
+			<yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099" :time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
 		</scroll-view>
 	</template>
 
@@ -274,6 +249,9 @@
 			data() {
 
 				return {
+					historyName: '恢复暂存',
+					tempState: '',
+
 					headers: {
 						Authorization: "Bearer " + getToken()
 					},
@@ -794,8 +772,8 @@
 					})
 				},
 				//提交数据
-				submit() {
-
+				submit(e) {
+					this.tempState = e == 'submit' ? '' : '99'
 					if (this.isEmpty(this.projectValue.dictValue)) {
 						this.$modal.msg("请选择工程周期")
 						return
@@ -868,10 +846,10 @@
 						this.$modal.msg('请上传视频')
 						return
 					}
-					if (this.loading == false) {
-						this.$modal.msg('照片或视频未上传完毕,无法提交!')
-						return
-					}
+					// if (this.loading == false) {
+					// 	this.$modal.msg('照片或视频未上传完毕,无法提交!')
+					// 	return
+					// }
 					//提交
 					this.onsubmit();
 
@@ -902,6 +880,7 @@
 						zEngineeringNodeBo: {
 							type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
 							zEngineeringInfoBo: {
+								state: this.tempState,
 								ductalEpithelium: this.imgGuanArr, //照片集合
 								//constructionRecords: this.imgPipelineArr,
 								trenchProspect: this.imgArr,
@@ -934,6 +913,14 @@
 
 				},
 				history() {
+					this.projectContent = '';
+					this.imgGuanArr = [];
+
+					this.imgArr = [];
+					this.videoArr = [];
+					this.zEngineeringMaterialBo = [];
+					this.czggslList = [];
+
 					if (this.isEmpty(this.projectValue.dictValue)) {
 						this.$modal.msg("请选择工程周期")
 						return
@@ -975,14 +962,88 @@
 
 										this.historyList = res.data
 										if (res.data.zEngineeringNodeBo != null) {
-											this.showHistoryList();
+											//this.showHistoryList();
+											if (res.data.zEngineeringNodeBo.reviewStatus == '1') {
+												this.$modal.msg("当前步骤以审核通过请谨慎!")
+											} else if (res.data.zEngineeringNodeBo.reviewStatus == '99') {
+												let dataJson = res.data.zEngineeringNodeBo.zEngineeringInfoBoList[0];
+												this.projectContent = dataJson.remark;
+												this.time = dataJson.constructTime;
+
+												this.imgGuanArr = dataJson.ductalEpithelium;
+												this.imgArr = dataJson.trenchProspect;
+												this.videoArr = dataJson.video;
+												this.zEngineeringMaterialBo = dataJson.zEngineeringMaterialBo;
+
+												this.zEngineeringMaterialBo.forEach((item) => {
+													this.czggslList.push({
+														cz: {
+															id: item.materialQuality,
+															name: item.materialQualityName
+														},
+														gg: {
+															id: item.specifications,
+															name: item.specificationsName
+														},
+
+														sl: {
+															inputIntegerNumberValue: this.getIntegerPart(item.number, 0),
+															inputDecimalNumberValue: this.getIntegerPart(item.number, 1)
+														}
+													})
+												})
+											} else {
+												this.czggslList.push({
+													cz: {
+														id: '',
+														name: ''
+													},
+													gg: {
+														id: '',
+														name: ''
+													},
+													sl: {
+														inputIntegerNumberValue: '',
+														inputDecimalNumberValue: ''
+													}
+												});
+												this.$modal.msg("暂无暂存信息")
+											}
 										} else {
 											this.$modal.msg("暂无历史信息")
+											this.czggslList.push({
+												cz: {
+													id: '',
+													name: ''
+												},
+												gg: {
+													id: '',
+													name: ''
+												},
+												sl: {
+													inputIntegerNumberValue: '',
+													inputDecimalNumberValue: ''
+												}
+											});
 										}
 
 									})
 
 							} else {
+								this.czggslList.push({
+									cz: {
+										id: '',
+										name: ''
+									},
+									gg: {
+										id: '',
+										name: ''
+									},
+									sl: {
+										inputIntegerNumberValue: '',
+										inputDecimalNumberValue: ''
+									}
+								});
 								this.$modal.msg("暂无工程信息")
 							}
 						} else {
@@ -991,6 +1052,9 @@
 					})
 
 				},
+				getIntegerPart(numStr, i) {
+					return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
+				},
 				showHistoryList() {
 					this.$refs.refShare.handleShowShare();
 				}

+ 41 - 32
pages/oldrenovation/indoor/indoor.vue

@@ -530,7 +530,7 @@
 					headers: {
 						Authorization: "Bearer " + getToken()
 					},
-					historyName: '',
+					historyName: '恢复暂存',
 					houseHeadName: '',
 					houseHeadPhone: '',
 					houseHeadIDcardNumber: '',
@@ -604,19 +604,6 @@
 			},
 			methods: {
 
-				getSelectName(id) {
-
-
-					let res = '';
-					this.tempSelectList.forEach((val) => {
-						if (id == val.id) {
-							console.log("====", val.name)
-							res = val.name
-
-						};
-					})
-					return res;
-				},
 				copyAddress() {
 					if (uni.getStorageSync('XZQValue') != {}) {
 						this.type = 'xzq';
@@ -633,11 +620,13 @@
 					if (uni.getStorageSync('DYValue') != {}) {
 						this.type = 'dy';
 						this.changeSelect(uni.getStorageSync('DYValue'))
+
 					}
 					if (uni.getStorageSync('FJValue') != {}) {
 						this.type = 'fj';
 						this.changeSelect(uni.getStorageSync('FJValue'))
 					}
+
 				},
 				//判断是否选择
 
@@ -951,7 +940,7 @@
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
 						this.currentResidentsPhoe = [];
-						this.historyName = "";
+						//this.historyName = "";
 						this.houseHeadName = "";
 						this.houseHeadPhone = "";
 						this.houseHeadIDcardNumber = "";
@@ -986,7 +975,7 @@
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
 						this.currentResidentsPhoe = [];
-						this.historyName = "";
+						//this.historyName = "";
 						this.houseHeadName = "";
 						this.houseHeadPhone = "";
 						this.houseHeadIDcardNumber = "";
@@ -1000,7 +989,7 @@
 						this.DYValue = ''; //重置单元数据
 						this.FJValue = ''; //重置房间数据
 						this.currentResidentsPhoe = [];
-						this.historyName = "";
+						//this.historyName = "";
 						this.houseHeadName = "";
 						this.houseHeadPhone = "";
 						this.houseHeadIDcardNumber = "";
@@ -1012,16 +1001,19 @@
 						//根据单元数据 获取房间数据
 						this.FJValue = ''; //重置房间数据
 						this.currentResidentsPhoe = [];
-						this.historyName = "";
+						//this.historyName = "";
 						this.houseHeadName = "";
 						this.houseHeadPhone = "";
 						this.houseHeadIDcardNumber = "";
 						getHousesList(item.id).then(res => {
 							this.FJList = res.data
+							console.log("dddd", res.data)
+
 						})
 					} else if (this.type == 'fj') {
 						this.FJValue = item;
-						this.history();
+						console.log("===s", item)
+						//this.history();
 						this.houseHeadName = item.houseUserName;
 						this.houseHeadPhone = item.phone;
 						this.houseHeadIDcardNumber = item.idCard;
@@ -1042,7 +1034,6 @@
 
 						}
 
-
 					} else if (this.type == 'zbf') {
 						this.SelfClosValve = item
 
@@ -1201,12 +1192,6 @@
 						return
 					}
 
-					uni.setStorageSync("XZQValue", this.XZQValue)
-					uni.setStorageSync("XQValue", this.XQValue)
-					uni.setStorageSync("LDValue", this.LDValue)
-					uni.setStorageSync("DYValue", this.DYValue)
-					uni.setStorageSync("FJValue", this.FJValue)
-
 					try {
 						this.currentResidentsPhoe.forEach((list) => {
 							if (this.isEmpty(list.phone)) {
@@ -1222,6 +1207,12 @@
 					} catch (e) {
 						if (e.message === 'End Loop') throw e
 					}
+					uni.setStorageSync("XZQValue", this.XZQValue)
+					uni.setStorageSync("XQValue", this.XQValue)
+					uni.setStorageSync("LDValue", this.LDValue)
+					uni.setStorageSync("DYValue", this.DYValue)
+					this.FJValue.newPhone = this.currentResidentsPhoe.map(item => item.phone).join();
+					uni.setStorageSync("FJValue", this.FJValue)
 					if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue == '切断阀') {
 						if (this.isEmpty(this.brandValue.id)) {
 							this.$modal.msg("请选择厂家")
@@ -1573,6 +1564,22 @@
 
 				},
 				history() {
+
+					this.LevelValue = {};
+					this.imgArr = [];
+
+					this.materialValue = {};
+					this.specificationValue = {};
+					this.inputIntegerNumberValue = '';
+					this.inputDecimalNumberValue = '';
+
+					this.brandValue = {};
+
+
+					this.doorValue = {};
+
+					this.SelfClosValve = {};
+
 					if (this.isEmpty(this.projectValue.dictValue)) {
 						this.$modal.msg("请选择工程周期")
 						return
@@ -1617,11 +1624,11 @@
 									// 	'未通过' : '已通过'
 
 
-									if (res.data.zEngineeringNodeBo.reviewStatus != null && res.data.zEngineeringNodeBo.reviewStatus == '99') {
-										this.historyName = '恢复暂存';
-									} else {
-										this.historyName = '';
-									}
+									// if (res.data.zEngineeringNodeBo.reviewStatus != null && res.data.zEngineeringNodeBo.reviewStatus == '99') {
+									// 	this.historyName = '恢复暂存';
+									// } else {
+									// 	this.historyName = '';
+									// }
 
 									this.historyList = res.data
 									if (res.data.zEngineeringNodeBo != null) {
@@ -1633,7 +1640,7 @@
 											let dataJson = res.data.zEngineeringNodeBo
 												.zEngineeringInfoBoList[0];
 											this.imgArr = dataJson.zEngiineeringPhotoBoList;
-											
+
 											if (this.objValue.enginClassValue == '拆旧管') {
 												this.LevelValue.id = dataJson
 													.zEngineeringMaterialBo[0]
@@ -1694,6 +1701,8 @@
 													.zEngineeringMaterialBo[0].specificationsName;
 											}
 
+										} else {
+											this.$modal.msg("暂无暂存信息")
 										}
 									} else {
 										this.$modal.msg("暂无历史信息")