zhnghongrui 1 năm trước cách đây
mục cha
commit
a6eaaf3a90
3 tập tin đã thay đổi với 89 bổ sung62 xóa
  1. 4 1
      api/common.js
  2. 1 1
      config.js
  3. 84 60
      pages/oldrenovation/indoor/indoor.vue

+ 4 - 1
api/common.js

@@ -225,7 +225,7 @@ export function getEnginSpecificationsList(materId) {
 }
 
 // 工程材质下拉
-export function getEnginMaterialQualityList(enginType, enginSort, enginNode, enginStep) {
+export function getEnginMaterialQualityList(enginType, enginSort, enginNode, enginStep,nameType) {
 	const data = {
 		enginType
 	}
@@ -234,6 +234,9 @@ export function getEnginMaterialQualityList(enginType, enginSort, enginNode, eng
 		data['enginNode'] = enginNode
 		data['enginStep'] = enginStep
 	}
+	if(nameType !== undefined ){
+		data['nameType'] = nameType
+	}
 	return request({
 		'url': '/zdsz/enginMaterialQuality/getEnginMaterialQualityList',
 		'method': 'get',

+ 1 - 1
config.js

@@ -4,7 +4,7 @@ module.exports = {
 	//baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
 	// baseUrl: 'http://192.168.4.6:8080',
 	// baseUrl: 'http://192.168.4.20:8080',
-	baseUrl: 'http://192.168.4.11:8080',
+	baseUrl: 'http://192.168.4.23:8080',
 	// baseUrl: 'http://192.168.4.14:8089',
 	baseIconUrl: 'https://www.xcx.cczdsz.cn/app/images/',
 	// 应用信息

+ 84 - 60
pages/oldrenovation/indoor/indoor.vue

@@ -112,7 +112,7 @@
 
 
 			<SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
-				titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
+				titleKey="dictLabel" subtitleKey="dictValue" v-model="name"></SelectPicker>
 			</view>
 			<view class="background">
 				<input class="uni-input" type="idcard" v-model="idCard" maxlength="18" placeholder="请输入身份证号码"
@@ -190,13 +190,13 @@
 						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
 
 							<text>厂 家</text>
-							<view v-if="this.isEmpty(this.brandValue.dictValue)" style="margin-top: 10;"
+							<view v-if="this.isEmpty(this.brandValue.id)" style="margin-top: 10;"
 								@click="pickerShow('brand')">
 								<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;" @click="pickerShow('brand')">
-								<span style="color: black;">{{brandValue.dictLabel}}</span>
+								<span style="color: black;">{{brandValue.name}}</span>
 								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 							</view>
 						</view>
@@ -220,13 +220,13 @@
 							<view>
 								腐蚀等级
 							</view>
-							<view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
+							<view v-if="this.isEmpty(this.LevelValue.id)" style="margin-top: 10;"
 								@click="pickerShow('fsdj')">
 								<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;" @click="pickerShow('fsdj')">
-								<span style="color: black;">{{LevelValue.dictLabel}}</span>
+								<span style="color: black;">{{LevelValue.name}}</span>
 								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 							</view>
 						</view>
@@ -248,13 +248,13 @@
 							<view>
 								孔距
 							</view>
-							<view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
+							<view v-if="this.isEmpty(this.LevelValue.id)" style="margin-top: 10;"
 								@click="pickerShow('kj')">
 								<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;" @click="pickerShow('kj')">
-								<span style="color: black;">{{LevelValue.dictLabel}}</span>
+								<span style="color: black;">{{LevelValue.name}}</span>
 								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 							</view>
 						</view>
@@ -332,13 +332,13 @@
 							<view>
 								品 牌
 							</view>
-							<view v-if="this.isEmpty(this.brandValue.dictValue)" style="margin-top: 10;"
+							<view v-if="this.isEmpty(this.brandValue.id)" style="margin-top: 10;"
 								@click="pickerShow('brand')">
 								<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;" @click="pickerShow('brand')">
-								<span style="color: black;">{{brandValue.dictLabel}}</span>
+								<span style="color: black;">{{brandValue.name}}</span>
 								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 							</view>
 						</view>
@@ -431,13 +431,13 @@
 							<view>
 								自闭阀厂家
 							</view>
-							<view v-if="this.isEmpty(this.SelfClosValve.dictValue)" style="margin-top: 10;"
+							<view v-if="this.isEmpty(this.SelfClosValve.id)" style="margin-top: 10;"
 								@click="pickerShow('zbf')">
 								<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;" @click="pickerShow('zbf')">
-								<span style="color: black;">{{SelfClosValve.dictLabel}}</span>
+								<span style="color: black;">{{SelfClosValve.name}}</span>
 								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
 							</view>
 						</view>
@@ -802,23 +802,34 @@
 							this.dictOptions = response.data;
 						});
 					} else if (e == 'zbf') { //自闭阀类型
-						this.openDict = true;
-						getDicts("self_closing_valve_type").then(response => {
-							this.dictOptions = response.data;
+						this.open = true;
+						getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
+							.objValue.enginClassValue, '自闭阀厂家').then(response => {
+							this.selectList = response.data;
 						});
 					} else if (e == 'brand') { //品牌
-						this.openDict = true;
-						getDicts("brand").then(response => {
-							this.dictOptions = response.data;
-						});
-
-					} else if (e == 'cz') { //材质
 						this.open = true;
 						getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
 							.objValue.enginClassValue).then(response => {
 							this.selectList = response.data;
 						});
 
+					} else if (e == 'cz') { //材质
+						this.open = true;
+						if (this.objValue.enginClassValue == '阀管') {
+							getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
+								this
+								.objValue.enginClassValue, "灶具管厂家").then(response => {
+								this.selectList = response.data;
+							});
+						} else {
+							getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
+								this
+								.objValue.enginClassValue).then(response => {
+								this.selectList = response.data;
+							});
+						}
+
 					} else if (e == 'gg') { //规格
 						if (this.isEmpty(this.materialValue.id)) {
 							if (this.objValue.enginClassValue == '阀管') {
@@ -833,18 +844,18 @@
 						}
 
 					} else if (e == 'fsdj') {
-						//腐蚀等级
-						this.openDict = true;
-						//腐蚀等级
-						getDicts("corrosion_level").then(response => {
-							this.dictOptions = response.data;
+						this.open = true;
+						getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
+							.objValue.enginClassValue).then(response => {
+							this.selectList = response.data;
 						});
 
 					} else if (e == 'kj') {
 						//孔距
-						this.openDict = true;
-						getDicts("perforated_pipe_diameter").then(response => {
-							this.dictOptions = response.data;
+						this.open = true;
+						getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
+							.objValue.enginClassValue).then(response => {
+							this.selectList = response.data;
 						});
 
 					} else if (e == 'gczq') { //工程周期
@@ -914,12 +925,6 @@
 					if (this.type == 'door') {
 						this.doorValue = item
 
-					} else if (this.type == 'zbf') {
-						this.SelfClosValve = item
-
-					} else if (this.type == 'brand') {
-						this.brandValue = item
-
 					} else if (this.type == 'gczq') {
 						this.projectValue = item
 						if (!this.isEmpty(this.FJValue.id)) {
@@ -939,8 +944,6 @@
 						getAreaList(item.dictValue).then(res => {
 							this.XQList = res.data;
 						})
-					} else {
-						this.LevelValue = item;
 					}
 				},
 				changeSelect(item, index) {
@@ -957,9 +960,7 @@
 						})
 					} else if (this.type == 'gg') {
 						this.specificationValue = item;
-						var onlyNumbers = item.name.replace(/[^\d.]/g, '');
 
-						console.log(onlyNumbers); // 输出: "123456"
 
 					} else if (this.type == 'xq') {
 						this.XQValue = item;
@@ -987,10 +988,20 @@
 						})
 					} else if (this.type == 'fj') {
 						this.FJValue = item;
-						this.houseHeadName = 'dda';
-						this.houseHeadPhone = '125';
-						this.houseHeadIDcardNumber = '335';
-						if (!this.isEmpty(this.projectValue.dictValue)) {
+						this.houseHeadName = item.houseUserName;
+						this.houseHeadPhone = item.phone;
+						this.houseHeadIDcardNumber = item.idCard;
+						if (!this.isEmpty(item.newPhone)) {
+							this.currentResidentsPhoe = [];
+							let str = item.newPhone;
+							var array = str.split(",");
+							array.forEach((list) => {
+								this.currentResidentsPhoe.push({
+									phone: list
+								})
+							})
+						}
+						if (!this.isEmpty(this.projectValue.id)) {
 
 							//房间选完 判断 工程周期
 							this.getStatus();
@@ -998,6 +1009,14 @@
 						}
 
 
+					} else if (this.type == 'zbf') {
+						this.SelfClosValve = item
+
+					} else if (this.type == 'brand') {
+						this.brandValue = item
+
+					} else {
+						this.LevelValue = item;
 					}
 
 				},
@@ -1015,7 +1034,7 @@
 						buildingId: this.LDValue.id, // 楼宇id
 						unitId: this.DYValue.id, // 单元id
 						houseId: this.FJValue.id, // 房间id
-						enginCycle: this.projectValue.dictValue, // 工程周期
+						enginCycle: this.projectValue.id, // 工程周期
 						enginType: this.objValue.enginType, //写死 上一页面传过来的
 						enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
 					}
@@ -1076,8 +1095,8 @@
 							this.houseHeadIDcardNumber = res.data.idCard;
 							this.houseHeadPhone = res.data.phone;
 							this.XZQValue = {
-								dictValue: res.data.district,
-								dictLabel: res.data.districtName
+								id: res.data.district,
+								name: res.data.districtName
 							};
 
 							this.XQValue = {
@@ -1098,7 +1117,7 @@
 							}
 
 
-							getAreaList(this.XZQValue.dictValue).then(res => {
+							getAreaList(this.XZQValue.id).then(res => {
 								this.XQList = res.data;
 							})
 							getBuildingList(this.XQValue.id).then(res => {
@@ -1158,21 +1177,21 @@
 						if (e.message === 'End Loop') throw e
 					}
 					if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue == '切断阀') {
-						if (this.isEmpty(this.brandValue.dictValue)) {
+						if (this.isEmpty(this.brandValue.id)) {
 							this.$modal.msg("请选择厂家")
 						} else {
 							this.onsubmit();
 						}
 
 					} else if (this.objValue.enginClassValue == '打孔') {
-						if (this.isEmpty(this.LevelValue.dictValue)) {
+						if (this.isEmpty(this.LevelValue.id)) {
 							this.$modal.msg("请选择孔距") //打孔  判断孔距
 						} else {
 							this.onsubmit();
 						}
 					} else if (this.objValue.enginClassValue == '拆旧管') {
 
-						if (this.isEmpty(this.LevelValue.dictValue)) {
+						if (this.isEmpty(this.LevelValue.id)) {
 							this.$modal.msg("请选择腐蚀等级") //拆旧管  判断腐蚀等级
 						} else {
 							this.onsubmit();
@@ -1196,7 +1215,7 @@
 						}
 					} else if (this.objValue.enginClassValue == '挂表') {
 						//挂表  判断  品牌  
-						if (this.isEmpty(this.brandValue.dictValue)) {
+						if (this.isEmpty(this.brandValue.id)) {
 							this.$modal.msg("请选择品牌")
 						} else {
 							this.onsubmit();
@@ -1291,15 +1310,17 @@
 						//阀管  判断  材质  规格  米数
 						if (this.isEmpty(this.doorValue.dictValue)) {
 							this.$modal.msg("请选择上门类型")
-						} else if (this.isEmpty(this.SelfClosValve.dictValue)) {
+						} else if (this.isEmpty(this.SelfClosValve.id)) {
 							this.$modal.msg("请选择自闭阀厂家")
 						} else if (this.isEmpty(this.materialValue.id)) {
 							this.$modal.msg("请选择材质")
 						} else if (this.isEmpty(this.specificationValue.id)) {
 							this.$modal.msg("请选择规格")
-						} else if (this.isEmpty(this.inputIntegerNumberValue)) {
-							this.$modal.msg("请输入米数")
-						} else {
+						}
+						// else if (this.isEmpty(this.inputIntegerNumberValue)) {
+						// 	this.$modal.msg("请输入米数")
+						// } 
+						else {
 
 							if (this.isEmpty(this.inputDecimalNumberValue)) {
 								this.inputNumberValue = this.inputIntegerNumberValue;
@@ -1358,7 +1379,7 @@
 									zEngiineeringPhotoBoList: this.imgArr, //照片集合
 
 									zEngineeringMaterialBo: [{
-										corrosionLevel: this.LevelValue.dictValue //腐蚀等级 //孔距
+										corrosionLevel: this.LevelValue.id //腐蚀等级 //孔距
 									}]
 								}
 							}
@@ -1384,7 +1405,7 @@
 									zEngiineeringPhotoBoList: this.imgArr, //照片集合
 
 									zEngineeringMaterialBo: [{
-										brand: this.brandValue.dictValue, //品牌
+										brand: this.brandValue.id, //品牌
 										// number: this.inputNumberValue //米数
 									}]
 								}
@@ -1438,7 +1459,7 @@
 									zEngiineeringPhotoBoList: this.imgArr, //照片集合
 
 									zEngineeringMaterialBo: [{
-										brand: this.brandValue.dictValue, //品牌
+										brand: this.brandValue.id, //品牌
 										//number: this.inputNumberValue //米数
 									}]
 								}
@@ -1446,6 +1467,9 @@
 
 						}
 					} else if (this.objValue.enginClassValue == '阀管') { //自闭阀
+						var onlyNumbers = this.specificationValue.name.replace(/[^\d.]/g, '');
+
+						console.log(onlyNumbers); // 输出: "123456"
 						param = {
 							district: this.XZQValue.dictValue,
 							areaId: this.XQValue.id,
@@ -1464,10 +1488,10 @@
 
 									zEngineeringMaterialBo: [{
 										visitType: this.doorValue.dictValue, //上门类型
-										selfClosingValveType: this.SelfClosValve.dictValue, //自闭阀类型
+										selfClosingValveType: this.SelfClosValve.id, //自闭阀类型
 										materialQuality: this.materialValue.id, //材质
 										specifications: this.specificationValue.id, //规格
-										number: this.inputNumberValue //米数
+										number: onlyNumbers //米数
 									}]
 								}
 							}
@@ -1494,7 +1518,7 @@
 
 				},
 				history() {
-					if (this.isEmpty(this.projectValue.dictValue)) {
+					if (this.isEmpty(this.projectValue.id)) {
 						this.$modal.msg("请选择工程周期")
 						return
 					}