Browse Source

顶管 基建 材质规格多选

zhanghongrui 11 months ago
parent
commit
61c77dc6ce

+ 6 - 0
pages.json

@@ -128,6 +128,12 @@
 				"navigationBarTitleText": "历史详情"
 			}
 		},
+		{
+			"path": "pages/statistics/historyDetailsMouth",
+			"style": {
+				"navigationBarTitleText": "历史详情"
+			}
+		},
 
 		{
 			"path": "pages/statistics/history_details_bottom_leg",

+ 113 - 56
pages/TopPipeWork/TopPipeWork.vue

@@ -88,8 +88,7 @@
 							</view>
 
 
-							<view v-else
-								@click="chooseModel(item.picUrl,item.fileName)">
+							<view v-else @click="chooseModel(item.picUrl,item.fileName)">
 								{{item.fileName}}
 							</view>
 						</view>
@@ -142,61 +141,59 @@
 					</view>
 
 
-					<view class="uni-list">
+					<view v-for="(a,index) in czggslList" :key="index" class="num-style">
 						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
-
 							<view>
-								材 质
-							</view>
-							<view v-if="this.isEmpty(this.materialValue.id)" @click="pickerShow('cz')">
-								<span style="color: darkgray;">请选择材质</span>
-								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+								材质
 							</view>
-							<view v-else class="uni-list-cell-db" @click="pickerShow('cz')">
-								<span style="color: black;">{{materialValue.name}}</span>
+							<view class="uni-list-cell-db" @click="pickerShow('cz',index)">
+								<span style="color: black;">{{a.cz.id==''?'请选择材质':a.cz.name}}</span>
 								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 							</view>
+
 						</view>
-					</view>
-					<view class="uni-list">
 						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
 
 							<view>
-								规 
+								规格
 							</view>
-							<view v-if="this.isEmpty(this.specificationValue.id)" @click="pickerShow('gg')">
-								<span style="color: darkgray;">请选择规格</span>
-								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
-							</view>
-							<view v-else class="uni-list-cell-db" @click="pickerShow('gg')">
-								<span style="color: black;">{{specificationValue.name}}</span>
+
+							<view class="uni-list-cell-db" @click="pickerShow('gg',index)">
+								<span style="color: black;">{{a.gg.id==''?'请选择规格':a.gg.name}}</span>
 								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 							</view>
 						</view>
-					</view>
 
-					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
-						<text>米 数</text>
-						<!-- style="margin-left: 10px;text-align: right;" -->
-						<view style="display: flex; justify-content: right; width: 70%;">
-						<input class="uni-input" type="number" v-model="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="inputDecimalNumberValue" maxlength="1"
-							style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx; "></input>
+						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+							<text>米 数</text>
+							<!-- style="margin-left: 10px;text-align: right;" -->
+							<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>
+								<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>
+							</view>
 						</view>
+						<button v-if="index!=0" @click="this.czggslList.splice(index,1)" class="sc-btn">删除</button>
 					</view>
+					<button @click="this.czggslList.push({cz:{id: '',name: ''},gg:{id: '',name: ''},sl: {
+					inputIntegerNumberValue: '',
+					inputDecimalNumberValue: ''
+				}})" class="tj-btn">添加</button>
 				</view>
 			</view>
-
 			<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
-				<view class="container" style="color: gainsboro;">*请上传照片</view>
+				<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()"></image>
+						style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()">
+					</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.picUrl.substring(item.picUrl.length-4)=='jpeg' ">
+							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: 100rpx; height: 100rpx; margin: 0 12rpx;"
 								@click="showPhoto(index)">
 							</image>
@@ -301,6 +298,21 @@
 				fileName: '', //点击的文件名称
 				projectContent: '', //描述  
 				zEngineeringMaterialBo: [], //给后台传的值  用料列表
+				SelectIndex: '', //选择的索引值
+				czggslList: [{
+					cz: {
+						id: '',
+						name: ''
+					},
+					gg: {
+						id: '',
+						name: ''
+					},
+					sl: {
+						inputIntegerNumberValue: '',
+						inputDecimalNumberValue: ''
+					}
+				}, ],
 			}
 		},
 		created() {
@@ -364,9 +376,16 @@
 
 			},
 			showPhoto(index) {
+				let newArr = [];
+				this.imgArr.forEach((item, index) => {
+					if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
+						item.substring(item.length - 4) == 'jpeg') {
+						newArr.push(item)
+					}
+				});
 				uni.previewImage({
 					current: index,
-					urls: this.imgArr,
+					urls: newArr,
 				})
 
 			},
@@ -583,7 +602,8 @@
 
 
 			},
-			pickerShow(e) {
+			pickerShow(e, index) {
+				this.SelectIndex = index;
 				this.type = e; //赋值类型
 				if (e == 'gcmc') {
 					this.open = true;
@@ -599,9 +619,9 @@
 					});
 
 				} else if (e == 'gg') { //规格
-					if (this.isEmpty(this.materialValue.id)) {
+					if (this.isEmpty(this.czggslList[index].cz.id)) {
 						this.$modal.msg('请选择材质')
-
+						//	this.czggslList[index].cz = this.materialValue.id
 					} else {
 						this.open = true;
 						this.selectList = this.materialList;
@@ -647,16 +667,31 @@
 
 					})
 
-				} else if (this.type == 'cz') {
+				}
+				//  else if (this.type == 'cz') {
+				// 	this.materialValue = item;
+				// 	this.specificationValue = ''; //重置规格
+				// 	//根据材质ID 获取规格数据
+				// 	getEnginSpecificationsList(item.id).then(res => {
+				// 		this.materialList = res.data
+				// 	})
+				// } else if (this.type == 'gg') {
+				// 	this.specificationValue = item;
+
+				// }
+				else if (this.type == 'cz') {
 					this.materialValue = item;
 					this.specificationValue = ''; //重置规格
 					//根据材质ID 获取规格数据
 					getEnginSpecificationsList(item.id).then(res => {
 						this.materialList = res.data
+						this.czggslList[this.SelectIndex].cz.id = this.materialValue.id
+						this.czggslList[this.SelectIndex].cz.name = this.materialValue.name
 					})
 				} else if (this.type == 'gg') {
 					this.specificationValue = item;
-
+					this.czggslList[this.SelectIndex].gg.id = this.specificationValue.id
+					this.czggslList[this.SelectIndex].gg.name = this.specificationValue.name
 				}
 
 			},
@@ -687,18 +722,44 @@
 					this.$modal.msg('请选择工程名称')
 					return
 				}
-				if (this.isEmpty(this.materialValue.id)) {
-					this.$modal.msg("请选择材质")
-					return
-				}
-				if (this.isEmpty(this.specificationValue.id)) {
-					this.$modal.msg("请选择规格")
-					return
-				}
-				if (this.isEmpty(this.inputIntegerNumberValue)) {
-					this.$modal.msg("请输入米数")
-					return
+				try {
+					this.czggslList.forEach((list) => {
+						if (this.isEmpty(list.cz.id)) {
+							this.$modal.msg('材质不能为空')
+
+
+							throw new Error('End Loop')
+
+						}
+						if (this.isEmpty(list.gg.id)) {
+							this.$modal.msg('规格不能为空')
+							throw new Error('End Loop')
+
+						}
+
+						if (this.isEmpty(list.sl.inputIntegerNumberValue)) {
+							this.$modal.msg("请输入米数")
+							throw new Error('End Loop')
+						}
+
+
+
+					})
+				} catch (e) {
+					if (e.message === 'End Loop') throw e
 				}
+				this.zEngineeringMaterialBo = [];
+
+				this.czggslList.forEach((list) => {
+					this.zEngineeringMaterialBo.push({
+						materialQuality: list.cz.id,
+						specifications: list.gg.id,
+						number: list.sl.inputIntegerNumberValue + (list.sl
+							.inputDecimalNumberValue ==
+							'' ?
+							'' : "." + list.sl.inputDecimalNumberValue)
+					})
+				})
 				if (this.imgArr.length <= 0) {
 					this.$modal.msg('请上传照片或视频')
 					return
@@ -730,11 +791,7 @@
 							constructTime: this.time,
 							remark: this.projectContent,
 							zEngiineeringPhotoBoList: this.imgArr,
-							zEngineeringMaterialBo: [{
-								materialQuality: this.materialValue.id, //材质
-								specifications: this.specificationValue.id, //规格
-								number: this.inputNumberValue //数量
-							}]
+							zEngineeringMaterialBo: this.zEngineeringMaterialBo // 用料对象
 						}
 					}
 				}

+ 8 - 0
pages/collision/collisionMouth.vue

@@ -506,6 +506,14 @@
 						return
 					}
 
+					if (this.objValue.value == '原有管线压力' || this.objValue.value == '管道压力') {
+
+						if (this.isEmpty(this.pipePressure)) {
+							this.$modal.msg(this.placeholder)
+							return
+
+						}
+					}
 					if (this.imgArr.length <= 0) {
 						this.$modal.msg('请上传照片或视频')
 						return

+ 189 - 113
pages/infrastructure/infrastructure.vue

@@ -129,95 +129,108 @@
 							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 						</view>
 					</view>
+					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+						<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="100"
+									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>
 
-					<span
-						style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end;margin: 30rpx 10px;"
-						@click="change">切换</span>
-					<view class="uni-list">
-						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+					<view v-for="(a,index) in czggslList" :key="index" class="num-style">
+						<span
+							style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end;margin: 30rpx 10px;"
+							@click="change(index)">切换</span>
+						<view class="uni-list">
+							<view class="container" style="border-bottom: 1px solid #f8f8f8;">
 
-							<view>
-								材 质
-							</view>
-							<block v-if="isNew==false">
-								<view v-if="this.isEmpty(this.materialValue.id)" @click="pickerShow('cz')">
-									<span style="color: darkgray;">请选择材质</span>
-									<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+								<view>
+									材 质
 								</view>
-								<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
-									<span style="color: black;">{{materialValue.name}}</span>
-									<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+								<block v-if="a.isNew==false">
+									<view class="uni-list-cell-db" @click="pickerShow('cz',index)">
+										<span style="color: black;">{{a.cz.id==''?'请选择材质':a.cz.name}}</span>
+										<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+									</view>
+								</block>
+								<view v-else-if="a.isNew==true">
+
+									<input class="uni-input" maxlength="50" type="text" v-model="a.cz.id"
+										placeholder="请输入材质" style="margin-left: 10px;text-align: right;"></input>
 								</view>
-							</block>
-							<view v-else-if="isNew==true">
-
-								<input class="uni-input" maxlength="50" type="text" v-model="materialNewValue" placeholder="请输入材质"
-									style="margin-left: 10px;text-align: right;"></input>
 							</view>
 						</view>
-					</view>
-					<view class="uni-list">
-						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list">
+							<view class="container" style="border-bottom: 1px solid #f8f8f8;">
 
-							<view>
-								规 格
-							</view>
-							<block v-if="isNew==false">
-								<view v-if="this.isEmpty(this.specificationValue.id)" @click="pickerShow('gg')">
-									<span style="color: darkgray;">请选择规格</span>
-									<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+								<view>
+									规 格
 								</view>
-								<view v-else class="uni-list-cell-db" @click="pickerShow('gg')">
-									<span style="color: black;">{{specificationValue.name}}</span>
-									<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+								<block v-if="a.isNew==false">
+									<view class="uni-list-cell-db" @click="pickerShow('gg',index)">
+										<span style="color: black;">{{a.gg.id==''?'请选择规格':a.gg.name}}</span>
+										<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+									</view>
+								</block>
+								<view v-else-if="a.isNew==true">
+
+									<input class="uni-input" maxlength="50" type="text" v-model="a.gg.id"
+										placeholder="请输入规格" style="margin-left: 10px;text-align: right;"></input>
 								</view>
-							</block>
-							<view v-else-if="isNew==true">
-
-								<input class="uni-input"  maxlength="50"type="text" v-model="specificationNewValue" placeholder="请输入规格"
-									style="margin-left: 10px;text-align: right;"></input>
 							</view>
 						</view>
-					</view>
 
-					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
-						<text>米 数</text>
-						<!-- style="margin-left: 10px;text-align: right;" -->
-						<view style="display: flex; justify-content: right; width: 70%;">
-							<input class="uni-input" type="number" v-model="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="inputDecimalNumberValue" maxlength="1"
-								style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
+						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+							<text>米 数</text>
+							<!-- style="margin-left: 10px;text-align: right;" -->
+							<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>
+								<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>
+							</view>
 						</view>
+						<button v-if="index!=0" @click="this.czggslList.splice(index,1)" class="sc-btn">删除</button>
 					</view>
+					<button @click="this.czggslList.push({cz:{id: '',name: ''},isNew:false,gg:{id: '',name: ''},sl: {
+						inputIntegerNumberValue: '',
+						inputDecimalNumberValue: ''
+					}})" class="tj-btn">添加</button>
 				</view>
 			</view>
+		</view>
+		</view>
 
-			<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()"></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: 100rpx; height: 100rpx; margin: 0 12rpx;"
-								@click="showPhoto(index)">
-							</image>
-						</view>
-						<view v-else>
-							<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
-						</view>
-						<view @click="remove(index)"
-							style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
-							<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
-							</image>
-						</view>
+		<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()"></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: 100rpx; height: 100rpx; margin: 0 12rpx;"
+							@click="showPhoto(index)">
+						</image>
+					</view>
+					<view v-else>
+						<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+					</view>
+					<view @click="remove(index)" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+						<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
+						</image>
 					</view>
 				</view>
 			</view>
 		</view>
+		</view>
 		<view class="action-btn">
 			<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 		</view>
@@ -294,16 +307,31 @@
 
 				kgsjValue: '', //开工时间
 				jhgqValue: '', //计划工期
-
+				projectContent: '', //描述  
 				jgsjValue: '', //竣工时间
 				gcnrValue: '', //工程内容
 				id: '', //工程id
 				fileUrl: '', //点击的文件地址
 				fileName: '', //点击的文件名称
 				zEngineeringMaterialBo: [], //给后台传的值  用料列表
-				isNew: false, //是否新增
+				SelectIndex: '', //选择的索引值
 				specificationNewValue: '', //规格新增内容
 				materialNewValue: '', //材质新增内容
+				czggslList: [{
+					isNew: false, //是否新增
+					cz: {
+						id: '',
+						name: ''
+					},
+					gg: {
+						id: '',
+						name: ''
+					},
+					sl: {
+						inputIntegerNumberValue: '',
+						inputDecimalNumberValue: ''
+					}
+				}, ],
 
 			}
 		},
@@ -326,8 +354,13 @@
 
 			},
 
-			change() {
-				this.isNew = !this.isNew;
+			change(index) {
+				//this.isNew = !this.isNew;
+				this.czggslList[index].isNew = !this.czggslList[index].isNew;
+				this.czggslList[index].materialQuality = '';
+				this.czggslList[index].materialQualityName = '';
+				this.czggslList[index].specifications = '';
+				this.czggslList[index].specificationsName = '';
 			},
 			handleSubmit(e) {
 
@@ -593,8 +626,9 @@
 
 
 			},
-			pickerShow(e) {
+			pickerShow(e, index) {
 				this.type = e; //赋值类型
+				this.SelectIndex = index;
 				if (e == 'gcmc') {
 					this.open = true;
 					getInfrastructureNameList().then(response => {
@@ -608,9 +642,9 @@
 					});
 
 				} else if (e == 'gg') { //规格
-					if (this.isEmpty(this.materialValue.id)) {
+					if (this.isEmpty(this.czggslList[index].cz.id)) {
 						this.$modal.msg('请选择材质')
-
+						//	this.czggslList[index].cz = this.materialValue.id
 					} else {
 						this.open = true;
 						this.selectList = this.materialList;
@@ -668,10 +702,13 @@
 					//根据材质ID 获取规格数据
 					getEnginSpecificationsList(item.id).then(res => {
 						this.materialList = res.data
+						this.czggslList[this.SelectIndex].cz.id = this.materialValue.id
+						this.czggslList[this.SelectIndex].cz.name = this.materialValue.name
 					})
 				} else if (this.type == 'gg') {
 					this.specificationValue = item;
-
+					this.czggslList[this.SelectIndex].gg.id = this.specificationValue.id
+					this.czggslList[this.SelectIndex].gg.name = this.specificationValue.name
 				}
 
 			},
@@ -704,29 +741,67 @@
 					this.$modal.msg('请选择工程名称')
 					return
 				}
-				if (this.isNew) {
-					if (this.isEmpty(this.materialNewValue)) {
-						this.$modal.msg("请输入材质")
-						return
-					}
-					if (this.isEmpty(this.specificationNewValue)) {
-						this.$modal.msg("请输入规格")
-						return
-					}
-				} else {
-					if (this.isEmpty(this.materialValue.id)) {
-						this.$modal.msg("请选择材质")
-						return
-					}
-					if (this.isEmpty(this.specificationValue.id)) {
-						this.$modal.msg("请选择规格")
-						return
-					}
-				}
-				if (this.isEmpty(this.inputIntegerNumberValue)) {
-					this.$modal.msg("请输入米数")
-					return
+				// if (this.isNew) {
+				// 	if (this.isEmpty(this.materialNewValue)) {
+				// 		this.$modal.msg("请输入材质")
+				// 		return
+				// 	}
+				// 	if (this.isEmpty(this.specificationNewValue)) {
+				// 		this.$modal.msg("请输入规格")
+				// 		return
+				// 	}
+				// } else {
+				// 	if (this.isEmpty(this.materialValue.id)) {
+				// 		this.$modal.msg("请选择材质")
+				// 		return
+				// 	}
+				// 	if (this.isEmpty(this.specificationValue.id)) {
+				// 		this.$modal.msg("请选择规格")
+				// 		return
+				// 	}
+				// }
+				// if (this.isEmpty(this.inputIntegerNumberValue)) {
+				// 	this.$modal.msg("请输入米数")
+				// 	return
+				// }
+				try {
+					this.czggslList.forEach((list) => {
+						if (this.isEmpty(list.cz.id)) {
+							this.$modal.msg('材质不能为空')
+
+
+							throw new Error('End Loop')
+
+						}
+						if (this.isEmpty(list.gg.id)) {
+							this.$modal.msg('规格不能为空')
+							throw new Error('End Loop')
+
+						}
+
+						if (this.isEmpty(list.sl.inputIntegerNumberValue)) {
+							this.$modal.msg("请输入米数")
+							throw new Error('End Loop')
+						}
+
+
+
+					})
+				} catch (e) {
+					if (e.message === 'End Loop') throw e
 				}
+				this.zEngineeringMaterialBo = [];
+
+				this.czggslList.forEach((list) => {
+					this.zEngineeringMaterialBo.push({
+						materialQuality: list.cz.id,
+						specifications: list.gg.id,
+						number: list.sl.inputIntegerNumberValue + (list.sl
+							.inputDecimalNumberValue ==
+							'' ?
+							'' : "." + list.sl.inputDecimalNumberValue)
+					})
+				})
 				if (this.imgArr.length <= 0) {
 					this.$modal.msg('请上传照片或视频')
 					return
@@ -742,21 +817,21 @@
 				} else {
 					this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
 				}
-				if (this.isNew) {
-					//新增
-					this.zEngineeringMaterialBo.push({
-						specifications: this.specificationNewValue,
-						materialQuality: this.materialNewValue,
-						number: this.inputNumberValue,
-					})
-				} else {
-					//选择的
-					this.zEngineeringMaterialBo.push({
-						materialQuality: this.materialValue.id, //材质
-						specifications: this.specificationValue.id, //规格
-						number: this.inputNumberValue //数量
-					})
-				}
+				// if (this.isNew) {
+				// 	//新增
+				// 	this.zEngineeringMaterialBo.push({
+				// 		specifications: this.specificationNewValue,
+				// 		materialQuality: this.materialNewValue,
+				// 		number: this.inputNumberValue,
+				// 	})
+				// } else {
+				// 	//选择的
+				// 	this.zEngineeringMaterialBo.push({
+				// 		materialQuality: this.materialValue.id, //材质
+				// 		specifications: this.specificationValue.id, //规格
+				// 		number: this.inputNumberValue //数量
+				// 	})
+				// }
 				let param = {
 
 					enginName: this.projectName.name,
@@ -771,6 +846,7 @@
 					zEngineeringNodeBo: {
 						type: this.objValue.value,
 						zEngineeringInfoBo: {
+							remark: this.projectContent,
 							constructTime: this.time,
 							zEngiineeringPhotoBoList: this.imgArr,
 							zEngineeringMaterialBo: this.zEngineeringMaterialBo

+ 148 - 108
pages/statistics/historyDetailsInfrastructure.vue

@@ -8,67 +8,70 @@
 						<view class="tit-text">施工时间:</view>{{value.updateTime}}
 					</view>
 
+					<view class="cz-style" v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
+						<span
+							style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end;margin: 30rpx 10px;"
+							@click="change(key,index)">切换</span>
 
-					<span
-						style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end;margin: 30rpx 10px;"
-						@click="change(key)">切换</span>
-
-					<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
-
-						<view class="tit-text">
-							材 质
-						</view>
-						<block v-if="value.zEngineeringMaterialBo[0].isNew==false">
-							<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz',key)">
-								<span
-									style="color: black;">{{value.zEngineeringMaterialBo[0].materialQuality==''?'请选择材质':value.zEngineeringMaterialBo[0].materialQualityName}}</span>
+						<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
 
+							<view class="tit-text">
+								材 质
+							</view>
+							<block v-if="a.isNew==false">
+								<view class="uni-list-cell-db" style="margin-top: 10;"
+									@click="pickerShow('cz',key,index)">
+									<span
+										style="color: black;">{{a.materialQuality==''?'请选择材质':a.materialQualityName}}</span>
+
+								</view>
+							</block>
+							<view v-else>
+								<input class="uni-input" type="text" maxlength="50"
+									@change="setInfoBo(key,$event.target.value,'cz')" v-model="a.materialQualityName"
+									placeholder="请输入材质"
+									style="margin-left: 10px;text-align: right;border: 1px solid #00aaff; border-radius: 20rpx; padding-right: 15rpx;"></input>
 							</view>
-						</block>
-						<view v-else>
-							<input class="uni-input" type="text" maxlength="50"
-								@change="setInfoBo(key,$event.target.value,'cz')"
-								v-model="value.zEngineeringMaterialBo[0].materialQualityName" placeholder="请输入材质"
-								style="margin-left: 10px;text-align: right;border: 1px solid #00aaff; border-radius: 20rpx; padding-right: 15rpx;"></input>
 						</view>
-					</view>
-					<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
 
-						<view class="tit-text">
-							规 格
+							<view class="tit-text">
+								规 格
+							</view>
+							<block v-if="a.isNew==false">
+								<view class="uni-list-cell-db" style="margin-top: 10;"
+									@click="pickerShow('gg',key,index)">
+									<span
+										style="color: black;">{{a.specifications==''?'请选择规格':a.specificationsName}}</span>
+
+								</view>
+							</block>
+							<view v-else>
+								<input class="uni-input" type="text" maxlength="50"
+									@change="setInfoBo(key,$event.target.value,'gg')" v-model="a.specificationsName"
+									placeholder="请输入规格"
+									style="margin-left: 10px;text-align: right;border: 1px solid #00aaff; border-radius: 20rpx;padding-right: 15rpx;"></input>
+							</view>
 						</view>
-						<block v-if="value.zEngineeringMaterialBo[0].isNew==false">
-							<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg',key)">
-								<span
-									style="color: black;">{{value.zEngineeringMaterialBo[0].specifications==''?'请选择规格':value.zEngineeringMaterialBo[0].specificationsName}}</span>
 
+						<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
+							<text class="tit-text">米 数</text>
+							<view style="display: flex; justify-content: right; width: 70%;">
+								<input class="uni-input" type="number" :value="getIntegerPart(a.number,0)"
+									@change="setInfoBoNumber(key,index,$event.target.value,0)" 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" :value="getIntegerPart(a.number,1)"
+									@change="setInfoBoNumber(key,index,$event.target.value,1)" maxlength="1"
+									style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
 							</view>
-						</block>
-						<view v-else>
-							<input class="uni-input" type="text" maxlength="50"
-								@change="setInfoBo(key,$event.target.value,'gg')"
-								v-model="value.zEngineeringMaterialBo[0].specificationsName" placeholder="请输入规格"
-								style="margin-left: 10px;text-align: right;border: 1px solid #00aaff; border-radius: 20rpx;padding-right: 15rpx;"></input>
-						</view>
-					</view>
 
-					<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
-						<text class="tit-text">米 数</text>
-						<view style="display: flex; justify-content: right; width: 70%;">
-							<input class="uni-input" type="number"
-								:value="getIntegerPart(value.zEngineeringMaterialBo[0].number,0)"
-								@change="setInfoBoNumber(key,$event.target.value,0)" 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"
-								:value="getIntegerPart(value.zEngineeringMaterialBo[0].number,1)"
-								@change="setInfoBoNumber(key,$event.target.value,1)" maxlength="1"
-								style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
 						</view>
+						<button v-if="index!=0" @click="btnDel(key,index)" class="sc-btn">删除</button>
 
 					</view>
-
+					<button @click="btnAdd(key,index)" class="tj-btn">添加</button>
 
 
 					<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
@@ -133,6 +136,7 @@
 				dictOptions: [],
 				openDict: false,
 				dataIndex: 0, //数据用第几条
+				selectIndex: 0, //材质规格用的第几条
 				imageIndex: 0,
 				headers: {
 					Authorization: "Bearer " + getToken()
@@ -183,21 +187,25 @@
 							this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((val, index) => {
 								if (val.createBy == this.$user.state.name) {
 
-
 									this.selectList.forEach((item, index2) => {
-										if (val.zEngineeringMaterialBo[0].materialQuality == item
-											.id) {
-											this.dataJson.zEngineeringNodeBo
-												.zEngineeringInfoBoList[
-													index]
-												.zEngineeringMaterialBo[0].isNew = false
-
-										} else {
-											this.dataJson.zEngineeringNodeBo
-												.zEngineeringInfoBoList[
-													index]
-												.zEngineeringMaterialBo[0].isNew = true
-										}
+
+										val.zEngineeringMaterialBo.forEach((itemEnd, indexEnd) => {
+
+											if (itemEnd.materialQuality == item.id) {
+												this.dataJson.zEngineeringNodeBo
+													.zEngineeringInfoBoList[
+														index]
+													.zEngineeringMaterialBo[indexEnd]
+													.isNew = false
+
+											} else {
+												this.dataJson.zEngineeringNodeBo
+													.zEngineeringInfoBoList[
+														index]
+													.zEngineeringMaterialBo[indexEnd]
+													.isNew = true
+											}
+										})
 									})
 
 								}
@@ -215,6 +223,23 @@
 			}
 		},
 		methods: {
+			btnAdd(key, index) {
+
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.push({
+
+					'materialQuality': '',
+					'materialQualityName': '',
+					'number': '',
+					'specifications': '',
+					'specificationsName': '',
+					'isNew': false
+
+
+				});
+			},
+			btnDel(key, index) {
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.splice(index, 1);
+			},
 			//关闭弹窗
 			closeDict(e) {
 				this.openDict = false
@@ -398,12 +423,12 @@
 				}
 
 			},
-			setInfoBoNumber(key, number, i) {
-				let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0]
+			setInfoBoNumber(key, index, number, i) {
+				let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index]
 					.number;
 				let resAry = Ynumber.toString().split('.');
 				resAry[i] = number
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].number = resAry
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index].number = resAry
 					.join('.');
 			},
 			changeSelectDict(item, index) {
@@ -414,8 +439,9 @@
 
 				}
 			},
-			pickerShow(e, index) {
+			pickerShow(e, index, indexTwo) {
 				this.dataIndex = index;
+				this.selectIndex = indexTwo; //材质规格 第几条
 				this.chooseType = e;
 
 
@@ -436,13 +462,16 @@
 
 				}
 				if (e == 'gg') {
-					this.open = true;
-					//根据材质ID 获取规格数据
-					getEnginSpecificationsList(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
-						.zEngineeringMaterialBo[0]
-						.materialQuality).then(res => {
-						this.selectList = res.data
-					})
+					if (this.isEmpty(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
+							.zEngineeringMaterialBo[this.selectIndex].materialQuality)) {
+						this.$modal.msg('请选择材质')
+					} else {
+						this.open = true;
+						getEnginSpecificationsList(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
+							.zEngineeringMaterialBo[this.selectIndex].materialQuality).then(res => {
+							this.selectList = res.data
+						})
+					}
 				}
 
 
@@ -455,20 +484,26 @@
 			changeSelect(item, index) {
 				this.open = false;
 				if (this.chooseType == 'cz') {
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.materialQuality = item.id;
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.materialQualityName = item.name;
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specifications = '';
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specificationsName = '';
-
-
+				
+				
 				} else if (this.chooseType == 'gg') {
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specifications = item.id;
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specificationsName = item.name;
 				}
 			},
@@ -487,18 +522,20 @@
 
 				return isShow;
 			},
-			change(index) {
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[0].materialQuality =
+			change(index, index2) {
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[index2]
+					.materialQuality =
 					'';
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[0]
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[index2]
 					.materialQualityName = '';
 
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[0].specifications =
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[index2]
+					.specifications =
 					'';
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[0]
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[index2]
 					.specificationsName = '';
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[0].isNew = !this
-					.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[0].isNew;
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[index2].isNew = !this
+					.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].zEngineeringMaterialBo[index2].isNew;
 
 				this.$forceUpdate();
 			},
@@ -506,29 +543,32 @@
 				let isSubmit = true;
 				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
 					if (res.createBy == this.$user.state.name) {
-						if (res.zEngineeringMaterialBo[0].materialQuality == '') {
-							this.$modal.msg("请选择材质或输入材质");
-							isSubmit = false;
-						}
-						if (res.zEngineeringMaterialBo[0].specifications == '') {
-							this.$modal.msg("请选择规格或输入规格");
-							isSubmit = false;
-						}
-						if (res.zEngineeringMaterialBo[0].number == '') {
-							this.$modal.msg("请输入米数");
-							isSubmit = false;
-						}
-						if (this.getIntegerPart(res.zEngineeringMaterialBo[0].number, 0) == '') {
-							this.$modal.msg("请输入米数");
+						
+						res.zEngineeringMaterialBo.forEach((itme) => {
+							if (itme.materialQuality == '') {
+								this.$modal.msg("请选择材质或输入材质");
+								isSubmit = false;
+							}
+							if (itme.specifications == '') {
+								this.$modal.msg("请选择规格或输入规格");
+								isSubmit = false;
+							}
+							if (itme.number == '') {
+								this.$modal.msg("请输入米数");
+								isSubmit = false;
+							}
+							if (this.getIntegerPart(itme.number, 0) == '') {
+								this.$modal.msg("请输入米数");
+								isSubmit = false;
+							}
+						})
+						if (res.zEngiineeringPhotoBoList.length == 0) {
+							this.$modal.msg("请上传照片");
 							isSubmit = false;
 						}
-
-					}
-					if (res.zEngiineeringPhotoBoList.length == 0) {
-						this.$modal.msg("请上传照片");
-						isSubmit = false;
 					}
 
+
 				})
 				if (!isSubmit) {
 					return

+ 621 - 0
pages/statistics/historyDetailsMouth.vue

@@ -0,0 +1,621 @@
+<template>
+	<scroll-view>
+		<view class="uni-media-list" v-for="(value, key) in dataJson.zEngineeringNodeBo.zEngineeringInfoBoList"
+			:key="key" v-if="isEdit(value)">
+
+			<view class="uni-media-list-body">
+				<view>
+					<view class="uni-media-list-text-top">
+						<view class="tit-text">施工时间:</view>{{value.updateTime}}
+					</view>
+					<view class="uni-list" v-if="title=='管道压力'||title=='原有管线压力'">
+						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+
+							<text>{{title}}</text>
+							<input class="uni-input" type="digit"
+								v-model="title=='管道压力'?value.constructAccordingDrawings:value.constructAddre"
+								:placeholder="placeholder" maxlength="100"
+								style="margin-left: 10px;text-align: right;"></input>
+						</view>
+					</view>
+					<view class="uni-media-list-text-top">
+						<view class="uni-common-mt" style="width: 100%;">
+							<text class="tit-text" style=" font-size: 13px;color:
+									#000;margin-top: 5px;">施工内容:</text>
+							<view style="width: 100%;box-sizing: border-box;">
+								<textarea class="textarea" 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 :value="value.remark"
+									@blur="bindTextAreaBlur($event.target.value,key)"></textarea>
+							</view>
+						</view>
+					</view>
+
+
+
+
+
+
+
+					<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+						<image :src="loadImgSrc('updateimg.png')" mode=""
+							style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('other',key)">
+						</image>
+						<view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
+							style="position: relative;">
+							<view
+								v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
+								<image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+									@click="showPhoto(index,value.zEngiineeringPhotoBoList)">
+								</image>
+							</view>
+							<view v-else>
+								<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+							</view>
+							<view @click="removeht(index,key,'other')"
+								style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+								<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
+								</image>
+							</view>
+						</view>
+					</view>
+
+
+
+				</view>
+
+			</view>
+		</view>
+		</view>
+
+		<view class="action-btn" v-if="hideButton==false">
+			<button @click="submit" class="btn cu-btn block bg-blue lg round">确认</button>
+		</view>
+	</scroll-view>
+</template>
+
+<script>
+	import {
+		getDicts
+	} from "@/api/system/dict/data";
+	import {
+		getToken
+	} from '../../utils/auth';
+	import user from '@/store/modules/user'
+	import {
+		getHistoryMouthDetails,
+		SubmitMouth,
+	} from '@/api/common'
+	export default {
+
+		data() {
+			return {
+				// playVideo: false,//视频播放放大
+				// playVideoSrc:'',
+				selectZbfList: [],
+				dictOptions: [],
+				openDict: false,
+				dataIndex: 0, //数据用第几条
+				selectIndex: 0, //材质规格用的第几条
+				imageIndex: 0,
+				headers: {
+					Authorization: "Bearer " + getToken()
+				},
+				nodeId: '',
+				type: '',
+				title: '',
+				dataJson: '',
+				enginClassification: '',
+				enginType: '',
+				enginClassValue: '',
+				selectList: [],
+				open: false,
+				selectType: '',
+				hideButton: false,
+				placeholder: '',
+			}
+		},
+		onLoad(options) {
+			if ('params' in options) {
+				let e = JSON.parse(decodeURIComponent(options.params));
+				this.nodeId = e.id;
+				this.type = e.type;
+				getHistoryMouthDetails(this.nodeId, this.type).then(response => {
+					if (response.data.zEngineeringNodeBo != null) {
+						let flag = false;
+						for (let i in response.data.zEngineeringNodeBo.zEngineeringInfoBoList) {
+							if (response.data.zEngineeringNodeBo.zEngineeringInfoBoList[i].createBy == this.$user
+								.state.name) {
+								flag = true;
+								break;
+							}
+						}
+						if (flag) {
+
+							this.hideButton = false;
+							this.dataJson = response.data;
+							this.title = response.data.zEngineeringNodeBo.type;
+							this.placeholder = '请输入' + response.data.zEngineeringNodeBo.type;
+							// this.enginType = response.data.enginType;
+							// this.enginClassification = response.data.enginClassification;
+						} else {
+							this.hideButton = true;
+							this.$modal.msg("暂无本人历史信息")
+						}
+
+					} else {
+						this.hideButton = true;
+						this.$modal.msg("暂无历史信息")
+					}
+				});
+
+			}
+		},
+		methods: {
+			//关闭弹窗
+			close(e) {
+				this.open = false
+			},
+
+
+
+			bindTextAreaBlur(e, index) {
+
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].remark = e;
+
+			},
+
+			removeht(index, key, type) {
+				uni.showModal({
+					title: '提示',
+					content: '是否删除该图片或视频?',
+					success: (res) => {
+						if (res.confirm) {
+
+							if (type == 'other') {
+								this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
+									.zEngiineeringPhotoBoList
+									.splice(index, 1)
+
+							}
+
+						}
+					}
+				})
+			},
+
+
+			choose(type, index) {
+				this.dataIndex = index;
+				let _this = this;
+				uni.showActionSheet({
+					title: '上传',
+					itemList: ['图片', '视频'],
+					success: (res) => {
+						if (res.tapIndex == 0) {
+							this.chooseimage(type)
+						} else {
+							this.choosevideo(type)
+						}
+					}
+				})
+			},
+			chooseimage(e) {
+
+				let _this = this;
+				uni.chooseImage({
+					sizeType: ['album', 'camera'],
+					success(resp) {
+						resp.tempFiles.forEach((item, index) => {
+							const task = uni.uploadFile({
+								url: _this.$HTTP + `/obs`,
+								filePath: item.path,
+								name: 'file',
+								formData: {},
+								header: _this.headers,
+
+								success: res => {
+									let data = JSON.parse(res.data);
+									if (![200].includes(data.code)) {
+										_this.$modal.msg(data.msg)
+									} else {
+										if (_this.progress === 100) {
+											if (e == 'other') {
+												_this.dataJson.zEngineeringNodeBo
+													.zEngineeringInfoBoList[_this.dataIndex]
+													.zEngiineeringPhotoBoList.push(data.data
+														.url);
+											}
+											_this.$modal.msg('上传成功!')
+										}
+									}
+								},
+								fail: e => {
+									_this.$modal.msg('上传失败!')
+								},
+								complete: res => {
+									uni.hideLoading();
+									_this.uploading = false;
+
+								}
+							});
+							task.onProgressUpdate(res => {
+								_this.progress = res.progress;
+								uni.showLoading({
+									title: '上传中'
+								})
+								if (_this.progress != 100) {
+									_this.loading = false
+								} else {
+									_this.loading = true
+								}
+							});
+
+						})
+
+					},
+				})
+			},
+
+			choosevideo(e) {
+				let _this = this;
+				uni.chooseVideo({
+					sourceType: ['album', 'camera'],
+					maxDuration: 30,
+					success(resp) {
+						const task = uni.uploadFile({
+							url: _this.$HTTP + `/obs`,
+							filePath: resp.tempFilePath,
+							name: 'file',
+							formData: {},
+							header: _this.headers,
+							success: res => {
+								let data = JSON.parse(res.data);
+								if (![200].includes(res.statusCode)) {
+									this.uploadError(index, data);
+								} else {
+									//上传成功
+									if (_this.progress === 100) {
+										if (e == 'other') {
+											_this.dataJson.zEngineeringNodeBo
+												.zEngineeringInfoBoList[_this.dataIndex]
+												.zEngiineeringPhotoBoList.push(data.data.url);
+
+										}
+										_this.$modal.msg('上传成功!')
+									}
+								}
+							},
+							fail: e => {
+								_this.$modal.msg('上传失败!')
+								this.uploadError(index, e);
+							},
+							complete: res => {
+								uni.hideLoading();
+								_this.uploading = false;
+							}
+						});
+						task.onProgressUpdate(res => {
+							_this.progress = res.progress;
+							uni.showLoading({
+								title: '上传中'
+							})
+							if (_this.progress != 100) {
+								_this.loading = false
+							} else {
+								_this.loading = true
+							}
+						});
+
+					},
+				})
+			},
+			showPhoto(index, arr) {
+
+				let newArr = [];
+				arr.forEach((item, index) => {
+					if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
+						item.substring(item.length - 4) == 'jpeg') {
+						newArr.push(item)
+					}
+				});
+
+				uni.previewImage({
+					current: index,
+					urls: newArr,
+				})
+
+			},
+
+
+
+			isEmpty(str) {
+
+				return (!str || 0 === str.length);
+
+			},
+
+
+
+			isEdit(item) {
+				var isShow = item.createBy == this.$user.state.name;
+
+				return isShow;
+			},
+			submit() {
+				let isSubmit = true;
+
+
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
+					if (res.createBy == this.$user.state.name) {
+						if (this.title == '焊接、防腐' || this.title == '下管' || this.title ==
+							' 沟下连头') {
+							res.zEngineeringMaterialBo.forEach((itme) => {
+								if (itme.specifications == '') {
+									this.$modal.msg("请选择规格");
+									isSubmit = false;
+								}
+								if (itme.number == '') {
+									this.$modal.msg("请输入米数");
+									isSubmit = false;
+								}
+								if (this.getIntegerPart(itme.number, 0) == '') {
+									this.$modal.msg("请输入米数");
+									isSubmit = false;
+								}
+
+							})
+
+						}
+
+						if (this.title == '回填、撤场') {
+							if (res.zEngiineeringPhotoBoListOne.length <= 0) {
+								this.$modal.msg('请上传回填前照片')
+								isSubmit = false;
+							}
+							if (res.zEngiineeringPhotoBoListTwo.length <= 0) {
+								this.$modal.msg('请上传警示带铺设照片')
+								isSubmit = false;
+							}
+							if (res.zEngiineeringPhotoBoListThree.length <= 0) {
+								this.$modal.msg('请上传回填后照片')
+								isSubmit = false;
+							}
+						} else {
+							if (res.zEngiineeringPhotoBoList.length == 0) {
+								this.$modal.msg("请上传照片");
+								isSubmit = false;
+							}
+						}
+					}
+				})
+
+
+				if (!isSubmit) {
+					return
+				}
+
+				SubmitMouth('put', this.dataJson).then(
+
+					response => {
+						if (response.code == '200') {
+							uni.hideLoading()
+							uni.showToast({
+								title: response.msg,
+								icon: 'none',
+								duration: 2000
+							});
+							setTimeout(function() {
+								uni.navigateBack();
+							}, 1000)
+
+						}
+
+					});
+			}
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	.uni-media-list-body {
+		background: #fff;
+		border: 1px solid #eee;
+		border-radius: 40rpx;
+		margin: 20rpx;
+		padding: 10rpx 0 40rpx;
+		box-shadow: 0 0 5px #eee;
+	}
+
+	.uni-media-list-text-top {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 10px;
+		position: relative;
+
+	}
+
+
+	.to-right-icon {
+		width: 15px;
+		height: 15px;
+		position: absolute;
+		top: 50%;
+		transform: translateY(-50%);
+	}
+
+	.share {
+		width: 100%;
+		height: 100%;
+
+	}
+
+	.tit-text {
+		color: #4f535a;
+		margin-right: 20rpx;
+	}
+
+	.normal-text {}
+
+	.cz-style {
+		background: #e8f4f9;
+		margin: 20rpx;
+		padding: 10rpx;
+		border-radius: 20rpx;
+		border: 1px solid #d4e3f0;
+	}
+
+	.uni-media-list-text-top {
+		font-size: 14px;
+		color: #696969;
+		padding: 20rpx 20rpx;
+		border-bottom: 1px solid #eee;
+		display: flex;
+		align-items: center;
+	}
+
+	.share-box {
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0rpx;
+		left: 0rpx;
+		bottom: 0rpx;
+		right: 0rpx;
+		background-color: rgba(0, 0, 0, 0.4);
+		transition: .3s;
+		z-index: 999;
+	}
+
+	// 进入分享动画
+	.share-show {
+		transition: all 0.3s ease;
+		transform: translateY(0%) !important;
+		border-radius: 20px 20px 0px 0px;
+	}
+
+	.scroll-Y {
+		height: 58vh;
+	}
+
+	// 离开分享动画
+	.share-item {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		height: 70%;
+		background-color: #FFFFFF;
+		transition: all 0.3s ease;
+		transform: translateY(100%);
+		z-index: 1999;
+
+		.share-to {
+			width: 100%;
+			height: 30px;
+			display: flex;
+			justify-content: center;
+			margin: 30rpx 0;
+			align-items: center;
+
+
+		}
+
+		.content {
+			width: 100%;
+			height: auto;
+			display: flex;
+			flex-wrap: wrap;
+
+			.block {
+				width: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: left;
+				height: auto;
+
+				image {
+					width: 80rpx;
+					height: 80rpx;
+				}
+
+				text {
+					margin-top: 16rpx;
+					font-size: 28rpx;
+					color: #606266;
+				}
+			}
+		}
+
+		.cancel {
+			width: 100%;
+			height: 3rem;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border-top: 1rpx solid #E4E7ED;
+		}
+
+
+	}
+
+	.uni-media-list-text-top {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 10px;
+		position: relative;
+
+	}
+
+	.uni-list {
+		border: 1xp solid #eee;
+	}
+
+	.to-right-icon {
+		width: 15px;
+		height: 15px;
+		position: absolute;
+		top: 50%;
+		transform: translateY(-50%);
+	}
+
+
+	.text {
+		font-size: 16px;
+		color: #333;
+	}
+
+	.tj-btn {
+		height: 69rpx;
+		background: #3184f0;
+		border-radius: 6rpx;
+		font-size: 25rpx;
+		font-weight: 400;
+		color: #FFFFFF;
+		line-height: 69rpx;
+		margin: 40rpx 70rpx;
+
+	}
+
+	.sc-btn {
+		height: 69rpx;
+		background: #f0686b;
+		border-radius: 6rpx;
+		font-size: 25rpx;
+		font-weight: 400;
+		color: #FFFFFF;
+		line-height: 69rpx;
+		margin: 40rpx;
+
+	}
+
+	// .gesture-area {
+	// 	//加浮动弹窗
+	//   width: 100%;
+	//   height: 100%;
+	// }
+</style>

+ 101 - 62
pages/statistics/historyDetailsTopTube.vue

@@ -22,45 +22,43 @@
 						</view>
 					</view>
 
-					<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
+					<view class="cz-style" v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
+						<view class="uni-media-list-text-top" style=" ">
+							<view class="tit-text">材质:</view>
 
-						<view class="tit-text">
-							材 质
-						</view>
-
-						<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz',key)">
-							<span style="color: black;">{{value.zEngineeringMaterialBo[0].materialQualityName}}</span>
-
-						</view>
-					</view>
-					<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
+							<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz',key,index)">
+								<span
+									style="color: black;">{{a.materialQualityName==''?'请选择材质':a.materialQualityName}}</span>
 
-						<view class="tit-text">
-							规 格
+							</view>
 						</view>
 
-						<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg',key)">
-							<span
-								style="color: black;">{{value.zEngineeringMaterialBo[0].specificationsName==''?'请选择规格':value.zEngineeringMaterialBo[0].specificationsName}}</span>
+						<view class="uni-media-list-text-top" style=" ">
+							<view class="tit-text">规格:</view>
+							<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg',key,index)">
+								<span
+									style="color: black;">{{a.specificationsName==''?'请选择规格':a.specificationsName}}</span>
 
+							</view>
 						</view>
-					</view>
-					<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
-						<text class="tit-text">米 数</text>
-						<view style="display: flex; justify-content: right; width: 70%;">
-							<input class="uni-input" type="number"
-								:value="getIntegerPart(value.zEngineeringMaterialBo[0].number,0)"
-								@change="setInfoBoNumber(key,$event.target.value,0)" 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"
-								:value="getIntegerPart(value.zEngineeringMaterialBo[0].number,1)"
-								@change="setInfoBoNumber(key,$event.target.value,1)" maxlength="1"
-								style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
+
+						<view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
+							<text class="tit-text">米 数</text>
+							<view style="display: flex; justify-content: right; width: 70%;">
+								<input class="uni-input" type="number" :value="getIntegerPart(a.number,0)"
+									@change="setInfoBoNumber(key,index,$event.target.value,0)" 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" :value="getIntegerPart(a.number,1)"
+									@change="setInfoBoNumber(key,index,$event.target.value,1)" maxlength="1"
+									style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
+							</view>
 						</view>
+						<button v-if="index!=0" @click="btnDel(key,index)" class="sc-btn">删除</button>
 
 					</view>
+					<button @click="btnAdd(key,index)" class="tj-btn">添加</button>
 
 
 
@@ -126,6 +124,7 @@
 				dictOptions: [],
 				openDict: false,
 				dataIndex: 0, //数据用第几条
+				selectIndex: 0, //材质规格用的第几条
 				imageIndex: 0,
 				headers: {
 					Authorization: "Bearer " + getToken()
@@ -187,6 +186,21 @@
 			closeDict(e) {
 				this.openDict = false
 			},
+			btnAdd(key, index) {
+
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.push({
+
+					'materialQuality': '',
+					'materialQualityName': '',
+					'number': '',
+					'specifications': '',
+					'specificationsName': ''
+
+				});
+			},
+			btnDel(key, index) {
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.splice(index, 1);
+			},
 			remove(index, key) {
 				uni.showModal({
 					title: '提示',
@@ -357,12 +371,12 @@
 			getIntegerPart(numStr, i) {
 				return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
 			},
-			setInfoBoNumber(key, number, i) {
-				let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0]
+			setInfoBoNumber(key, index, number, i) {
+				let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index]
 					.number;
 				let resAry = Ynumber.toString().split('.');
 				resAry[i] = number
-				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].number = resAry
+				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index].number = resAry
 					.join('.');
 			},
 			changeSelectDict(item, index) {
@@ -373,8 +387,9 @@
 
 				}
 			},
-			pickerShow(e, index) {
+			pickerShow(e, index, indexTwo) {
 				this.dataIndex = index;
+				this.selectIndex = indexTwo; //材质规格 第几条
 				this.chooseType = e;
 
 
@@ -395,13 +410,16 @@
 
 				}
 				if (e == 'gg') {
-					this.open = true;
-					//根据材质ID 获取规格数据
-					getEnginSpecificationsList(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
-						.zEngineeringMaterialBo[0]
-						.materialQuality).then(res => {
-						this.selectList = res.data
-					})
+					if (this.isEmpty(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
+							.zEngineeringMaterialBo[this.selectIndex].materialQuality)) {
+						this.$modal.msg('请选择材质')
+					} else {
+						this.open = true;
+						getEnginSpecificationsList(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
+							.zEngineeringMaterialBo[this.selectIndex].materialQuality).then(res => {
+							this.selectList = res.data
+						})
+					}
 				}
 
 
@@ -414,20 +432,26 @@
 			changeSelect(item, index) {
 				this.open = false;
 				if (this.chooseType == 'cz') {
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.materialQuality = item.id;
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.materialQualityName = item.name;
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specifications = '';
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specificationsName = '';
 
 
 				} else if (this.chooseType == 'gg') {
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specifications = item.id;
-					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[0]
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
+							.selectIndex]
 						.specificationsName = item.name;
 				}
 			},
@@ -450,25 +474,40 @@
 				let isSubmit = true;
 				this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
 					if (res.createBy == this.$user.state.name) {
-						if (res.zEngineeringMaterialBo[0].specifications == '') {
-							this.$modal.msg("请选择规格");
-							isSubmit = false;
-						}
-						if (res.zEngineeringMaterialBo[0].number == '') {
-							this.$modal.msg("请输入米数");
-							isSubmit = false;
-						}
-						if (this.getIntegerPart(res.zEngineeringMaterialBo[0].number, 0) == '') {
-							this.$modal.msg("请输入米数");
+						// if (res.zEngineeringMaterialBo[0].specifications == '') {
+						// 	this.$modal.msg("请选择规格");
+						// 	isSubmit = false;
+						// }
+						// if (res.zEngineeringMaterialBo[0].number == '') {
+						// 	this.$modal.msg("请输入米数");
+						// 	isSubmit = false;
+						// }
+						// if (this.getIntegerPart(res.zEngineeringMaterialBo[0].number, 0) == '') {
+						// 	this.$modal.msg("请输入米数");
+						// 	isSubmit = false;
+						// }
+
+						res.zEngineeringMaterialBo.forEach((itme) => {
+							if (itme.specifications == '') {
+								this.$modal.msg("请选择规格");
+								isSubmit = false;
+							}
+							if (itme.number == '') {
+								this.$modal.msg("请输入米数");
+								isSubmit = false;
+							}
+							if (this.getIntegerPart(itme.number, 0) == '') {
+								this.$modal.msg("请输入米数");
+								isSubmit = false;
+							}
+						})
+						if (res.zEngiineeringPhotoBoList.length == 0) {
+							this.$modal.msg("请上传照片");
 							isSubmit = false;
 						}
-
-					}
-					if (res.zEngiineeringPhotoBoList.length == 0) {
-						this.$modal.msg("请上传照片");
-						isSubmit = false;
 					}
 
+
 				})
 				if (!isSubmit) {
 					return

+ 14 - 2
pages/statistics/statistics.vue

@@ -686,7 +686,6 @@
 
 
 			chooseNode(item) {
-				console.log("ddd")
 				if (this.EngineeringValue == '民用工程') {
 					this.typeList = item.nodeReViewStateList
 					this.nodeId = item.id;
@@ -720,7 +719,7 @@
 								obj))
 					})
 				} else if (this.EngineeringValue == '市政工程' || this.EngineeringValue == '基建工程' || this.EngineeringValue ==
-					'顶管工程' || this.EngineeringValue == '工业工程') {
+					'顶管工程' || this.EngineeringValue == '工业工程'|| this.EngineeringValue == '碰口作业') {
 					this.nodeId = item.id;
 					let result = JSON.parse(JSON.stringify(item.status).replace(/type/g, 'Type'));
 					this.typeList = result;
@@ -867,6 +866,19 @@
 						})
 						this.handleHiddenShare();
 
+					} else if (this.EngineeringValue == '碰口作业') {
+						let obj = {
+							id: this.nodeId,
+							type: item.Type,
+						};
+						console.log("===",obj)
+						uni.navigateTo({
+							url: '/pages/statistics/historyDetailsMouth?params=' + encodeURIComponent(JSON
+								.stringify(
+									obj))
+						})
+						this.handleHiddenShare();
+
 					}
 				}
 			},