Selaa lähdekoodia

基建工程历史

zhanghongrui 1 vuosi sitten
vanhempi
commit
38ddd4e5bf

+ 8 - 1
api/common.js

@@ -1,5 +1,12 @@
 import request from '@/utils/request'
-
+//基建工程修改
+export function PutInfrastructure(param) {
+	return request({
+		'url': '/zdsz/engineeringInfrastructure',
+		'method': 'put',
+		'data': param
+	})
+}
 // 获取顶管历史详情
 export function getHistoryInfrastructureDetails(id, name) {
 

+ 15 - 16
pages/infrastructure/infrastructure.vue

@@ -89,8 +89,7 @@
 								<video :src="item.picUrl"
 									style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
 							</view>
-							<view v-else 
-								@click="chooseModel(item.picUrl,item.fileName)">
+							<view v-else @click="chooseModel(item.picUrl,item.fileName)">
 								{{item.fileName}}
 							</view>
 						</view>
@@ -140,7 +139,7 @@
 							<view>
 								材 质
 							</view>
-							<view v-if="isNew==false">
+							<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>
@@ -149,10 +148,10 @@
 									<span style="color: black;">{{materialValue.name}}</span>
 									<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 								</view>
-							</view>
+							</block>
 							<view v-else-if="isNew==true">
 
-								<input class="uni-input" type="text" v-model="materialNewValue" placeholder="请输入材质"
+								<input class="uni-input" maxlength="50" type="text" v-model="materialNewValue" placeholder="请输入材质"
 									style="margin-left: 10px;text-align: right;"></input>
 							</view>
 						</view>
@@ -163,7 +162,7 @@
 							<view>
 								规 格
 							</view>
-							<view v-if="isNew==false">
+							<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>
@@ -172,24 +171,24 @@
 									<span style="color: black;">{{specificationValue.name}}</span>
 									<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 								</view>
-							</view>
+							</block>
 							<view v-else-if="isNew==true">
 
-								<input class="uni-input" type="text" v-model="specificationNewValue" placeholder="请输入规格"
+								<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>
+							<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>
 					</view>
 				</view>
@@ -736,8 +735,8 @@
 					this.$modal.msg('照片或视频未上传完毕,无法提交!')
 					return
 				}
-				
-				
+
+
 				if (this.isEmpty(this.inputDecimalNumberValue)) {
 					this.inputNumberValue = this.inputIntegerNumberValue;
 				} else {

+ 39 - 15
pages/statistics/historyDetailsInfrastructure.vue

@@ -18,17 +18,18 @@
 						<view class="tit-text">
 							材 质
 						</view>
-						<view v-if="value.zEngineeringMaterialBo[0].isNew==false">
+						<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].materialQualityName==''?'请选择材质':value.zEngineeringMaterialBo[0].materialQualityName}}</span>
+									style="color: black;">{{value.zEngineeringMaterialBo[0].materialQuality==''?'请选择材质':value.zEngineeringMaterialBo[0].materialQualityName}}</span>
 
 							</view>
-						</view>
+						</block>
 						<view v-else>
-							<input class="uni-input" type="text"
+							<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;"></input>
+								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;">
@@ -36,17 +37,18 @@
 						<view class="tit-text">
 							规 格
 						</view>
-						<view v-if="value.zEngineeringMaterialBo[0].isNew==false">
+						<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].specificationsName==''?'请选择规格':value.zEngineeringMaterialBo[0].specificationsName}}</span>
+									style="color: black;">{{value.zEngineeringMaterialBo[0].specifications==''?'请选择规格':value.zEngineeringMaterialBo[0].specificationsName}}</span>
 
 							</view>
-						</view>
+						</block>
 						<view v-else>
-							<input class="uni-input" type="text"
+							<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;"></input>
+								style="margin-left: 10px;text-align: right;border: 1px solid #00aaff; border-radius: 20rpx;padding-right: 15rpx;"></input>
 						</view>
 					</view>
 
@@ -118,7 +120,7 @@
 	import {
 		getHistoryInfrastructureDetails,
 		getEnginMaterialQualityList,
-		PutTopPipeWork,
+		PutInfrastructure,
 		getEnginSpecificationsList,
 	} from '@/api/common'
 	export default {
@@ -343,11 +345,18 @@
 				})
 			},
 			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: arr,
+					urls: newArr,
 				})
-
 			},
 			//关闭弹窗
 			close(e) {
@@ -358,6 +367,17 @@
 			getIntegerPart(numStr, i) {
 				return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
 			},
+
+			setInfoBo(key, str, type) {
+				if (type == 'cz') {
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].materialQuality = str;
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].materialQualityName = str;
+				}else{
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].specifications = str;
+					this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].specificationsName = str;
+				}
+
+			},
 			setInfoBoNumber(key, number, i) {
 				let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0]
 					.number;
@@ -466,8 +486,12 @@
 				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("请选择规格");
+							this.$modal.msg("请选择规格或输入规格");
 							isSubmit = false;
 						}
 						if (res.zEngineeringMaterialBo[0].number == '') {
@@ -490,7 +514,7 @@
 					return
 				}
 
-				PutTopPipeWork(this.dataJson).then(
+				PutInfrastructure(this.dataJson).then(
 
 					response => {
 						if (response.code == '200') {

+ 14 - 1
pages/statistics/historyDetailsTopTube.vue

@@ -315,9 +315,22 @@
 				})
 			},
 			showPhoto(index, arr) {
+				// uni.previewImage({
+				// 	current: index,
+				// 	urls: 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: arr,
+					urls: newArr,
 				})
 
 			},