Explorar el Código

Merge branch 'zdsz3.0' of http://192.168.10.18:3000/wangtong/zd_wechatApp into zdsz3.0

menchuang hace 1 año
padre
commit
ae160f56c3
Se han modificado 3 ficheros con 81 adiciones y 45 borrados
  1. 8 0
      api/common.js
  2. 43 32
      pages/enginproject/enginproject.vue
  3. 30 13
      pages/open_bolt/open_bolt.vue

+ 8 - 0
api/common.js

@@ -178,6 +178,14 @@ export function getDangerousWorkProjectDetails(id) {
 	})
 }
 
+// 获取工业工程历史2
+export function getEngineeringHistoryList2(id, type) {
+
+	return request({
+		'url': '/zdsz/engineeringIndustry/query/' + id + '/' + type,
+		'method': 'get',
+	})
+}
 // 获取工业工程历史
 export function getEngineeringHistoryList(id, type) {
 

+ 43 - 32
pages/enginproject/enginproject.vue

@@ -166,7 +166,7 @@
 							</view>
 						</view>
 
-						<view class="container" style="border-bottom: 1px solid #f8f8f8;" v-if="objValue.value=='调压柜'">
+						<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;">
@@ -179,7 +179,7 @@
 						</view>
 
 
-						<view v-for="(a,index) in czggslList" :key="index" class="num-style">
+						<view v-for="(a,index) in czggslList" :key="index" class="num-style" v-if="objValue.value!='调压柜'">
 							<view class="container" style="border-bottom: 1px solid #f8f8f8;">
 								<view>
 									材质
@@ -421,7 +421,7 @@
 			Submitengineering,
 			getengineeringNameList,
 			getEngineeringDetails,
-			getEngineeringHistoryList,
+			getEngineeringHistoryList2,
 		} from '@/api/common'
 		import {
 			getToken
@@ -980,10 +980,10 @@
 						this.$modal.msg('请选择工程名称')
 						return
 					}
-					getEngineeringHistoryList(this.enginId, this.objValue.value).then(response => {
+					getEngineeringHistoryList2(this.enginId, this.objValue.value).then(response => {
 
 						this.historyList = response.data
-						if (response.data.zEngineeringNodeBo.zEngineeringInfoBoList != null) {
+						if (response.data.zEngineeringNodeBo != null) {
 							this.$refs.refShare.handleShowShare();
 						} else {
 							this.$modal.msg("暂无历史信息")
@@ -1004,38 +1004,41 @@
 						return
 					}
 
+					if (this.objValue.value != '调压柜') {
 
-					try {
-						this.czggslList.forEach((list) => {
-							if (this.isEmpty(list.cz.id)) {
-								this.$modal.msg('材质不能为空')
 
 
-								throw new Error('End Loop')
+						try {
+							this.czggslList.forEach((list) => {
+								if (this.isEmpty(list.cz.id)) {
+									this.$modal.msg('材质不能为空')
 
-							}
-							if (this.isEmpty(list.gg.id)) {
-								this.$modal.msg('规格不能为空')
-								throw new Error('End Loop')
 
-							}
+									throw new Error('End Loop')
 
-							if (this.isEmpty(list.sl.inputIntegerNumberValue)) {
-								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
-					}
 
 
+							})
+						} catch (e) {
+							if (e.message === 'End Loop') throw e
+						}
+					}
+
 					if (this.objValue.value == '调压柜') {
 
-						if (this.imgDtljArr.length <= 0) {
+						if (this.imgBoxArr.length <= 0) {
 							this.$modal.msg('请上传调压箱名牌照片')
 							return
 						}
@@ -1066,15 +1069,17 @@
 						return
 					}
 					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.objValue.value != '调压柜') {
+						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)
+							})
 						})
-					})
-
+					}
 
 					let param = {
 						//files: this.fileArr, //文件
@@ -1098,6 +1103,12 @@
 							type: '工业工程', // 写死
 							zEngineeringInfoBo: {
 								//engInfoId: this.infonId,
+								remark: this.projectContent, //施工内容
+								boxBrand: this.imgBoxArr,
+								stonePowder: this.imgSfhtArr,
+								lightning: this.imgFljdArr,
+								bottomLeg: this.imgDtljArr,
+								groundHardening: this.imgHldmyhArr,
 								constructTime: this.time, //施工时间
 								zEngiineeringPhotoBoList: this.imgArr, //照片集合
 								zEngineeringMaterialBo: this.zEngineeringMaterialBo // 用料对象

+ 30 - 13
pages/open_bolt/open_bolt.vue

@@ -253,12 +253,13 @@
 					<view class="uni-list-cell-left">
 						进气方向
 					</view>
-					<view v-if="this.isEmpty(this.directionId)" class="uni-list-cell-db" style="margin-top: 10;">
+					<view v-if="this.isEmpty(this.direction.dictValue)" class="uni-list-cell-db" style="margin-top: 10;"
+						@click="pickerShow('jqfx')">
 						<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" style="margin-top: 10;">
-						<span style="color: black;">{{directionValue}}</span>
+					<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('jqfx')">
+						<span style="color: black;">{{direction.dictLabel}}</span>
 						<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 					</view>
 				</view>
@@ -353,12 +354,13 @@
 					<view class="uni-list-cell-left">
 						阀管类型
 					</view>
-					<view v-if="this.isEmpty(this.PipeTypeId)" class="uni-list-cell-db" style="margin-top: 10;">
+					<view v-if="this.isEmpty(this.PipeType.dictValue)" class="uni-list-cell-db" style="margin-top: 10;"
+						@click="pickerShow('fglx')">
 						<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" style="margin-top: 10;">
-						<span style="color: black;">{{PipeTypeValue}}</span>
+					<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fglx')">
+						<span style="color: black;">{{PipeType.dictLabel}}</span>
 						<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 					</view>
 				</view>
@@ -583,8 +585,8 @@
 					tableCharacters: '',
 					brankValue: '',
 					tableModel: '',
-					directionValue: '',
-					directionId: '',
+					direction: '',
+
 					imgArr3: [],
 					//4		
 					isFixationValue: '',
@@ -593,8 +595,7 @@
 					//5	
 					isPipeChangeValue: '',
 					isPipeChangeId: '',
-					PipeTypeValue: '',
-					PipeTypeId: '',
+					PipeType: '',
 					imgArr5: [],
 					//6
 					imgArr6: [],
@@ -672,7 +673,7 @@
 						this.$modal.msg("请上传燃气表照片")
 					} else if (this.imgArr4.length <= 0) {
 						this.$modal.msg("请上传表后管照片")
-					} else if (this.isPipeChangeValue == '是' && this.isEmpty(this.PipeTypeId)) {
+					} else if (this.isPipeChangeValue == '是' && this.isEmpty(this.PipeType.dictValue)) {
 						this.$modal.msg("请选择阀管类型")
 					} else if (this.imgArr5.length <= 0) {
 						this.$modal.msg("请上传灶前阀门照片")
@@ -976,7 +977,19 @@
 				},
 				pickerShow(e) {
 					this.type = e; //赋值类型
-					if (e == 'xzq') { //行政区
+					if (e == 'fglx') {
+
+						this.openDict = true;
+						getDicts("gas_change_type").then(response => {
+							this.dictOptions = response.data;
+						});
+
+					} else if (e == 'jqfx') {
+						this.openDict = true;
+						getDicts("gas_meter_direction").then(response => {
+							this.dictOptions = response.data;
+						});
+					} else if (e == 'xzq') { //行政区
 						if (this.isEmpty(this.projectValue.dictValue)) {
 							this.$modal.msg('请选择工程周期')
 
@@ -1026,7 +1039,11 @@
 				},
 				changeSelectDict(item, index) {
 					this.openDict = false;
-					if (this.type == 'xzq') {
+					if (this.type == 'fglx') {
+						this.PipeType = item;
+					} else if (this.type == 'jqfx') {
+						this.direction = item;
+					} else if (this.type == 'xzq') {
 						this.XZQValue = item;
 
 						//根据行政区id获取小区数据