|
@@ -1213,6 +1213,10 @@
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ if (this.currentResidentsPhoe.length <= 0) {
|
|
|
+ this.$modal.msg('现住人电话不能为空');
|
|
|
+ return
|
|
|
+ }
|
|
|
try {
|
|
|
this.currentResidentsPhoe.forEach((list) => {
|
|
|
if (this.isEmpty(list.phone)) {
|
|
@@ -1235,10 +1239,14 @@
|
|
|
this.FJValue.newPhone = this.currentResidentsPhoe.map(item => item.phone).join();
|
|
|
uni.setStorageSync("FJValue", this.FJValue)
|
|
|
if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue == '切断阀') {
|
|
|
- if (this.isEmpty(this.brandValue.id)) {
|
|
|
- this.$modal.msg("请选择厂家")
|
|
|
+ if (e == 'submit') {
|
|
|
+ if (this.isEmpty(this.brandValue.id)) {
|
|
|
+ this.$modal.msg("请选择厂家")
|
|
|
+ } else {
|
|
|
+ this.onsubmit(e);
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.onsubmit(e);
|
|
|
+ this.onsubmit(e); //暂存
|
|
|
}
|
|
|
|
|
|
} else if (this.objValue.enginClassValue == '打孔') {
|
|
@@ -1248,57 +1256,59 @@
|
|
|
this.onsubmit(e);
|
|
|
//}
|
|
|
} else if (this.objValue.enginClassValue == '拆旧管') {
|
|
|
+ if (e == 'submit') {
|
|
|
+ if (this.isEmpty(this.LevelValue.id)) {
|
|
|
+ this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
|
|
|
|
|
|
- if (this.currentResidentsPhoe.length == 0) {
|
|
|
- this.$modal.msg('现住人电话不能为空')
|
|
|
- } else if (this.isEmpty(this.LevelValue.id)) {
|
|
|
- this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
|
|
|
+ } else {
|
|
|
+ this.onsubmit(e);
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.onsubmit(e);
|
|
|
+ this.onsubmit(e); //暂存
|
|
|
}
|
|
|
} else if (this.objValue.enginClassValue == '立杠') {
|
|
|
//立杠 判断 材质 规格 米数
|
|
|
- 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 {
|
|
|
-
|
|
|
- if (this.isEmpty(this.inputDecimalNumberValue)) {
|
|
|
- this.inputNumberValue = this.inputIntegerNumberValue;
|
|
|
+ if (e == 'submit') {
|
|
|
+ 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 {
|
|
|
- this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
|
|
|
+
|
|
|
+ if (this.isEmpty(this.inputDecimalNumberValue)) {
|
|
|
+ this.inputNumberValue = this.inputIntegerNumberValue;
|
|
|
+ } else {
|
|
|
+ this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
|
|
|
+ }
|
|
|
+ this.onsubmit(e);
|
|
|
}
|
|
|
- this.onsubmit(e);
|
|
|
+ } else {
|
|
|
+ this.onsubmit(e); //暂存
|
|
|
}
|
|
|
} else if (this.objValue.enginClassValue == '挂表') {
|
|
|
//挂表 判断 品牌
|
|
|
- if (this.isEmpty(this.brandValue.id)) {
|
|
|
- this.$modal.msg("请选择品牌")
|
|
|
+ if (e == 'submit') {
|
|
|
+ if (this.isEmpty(this.brandValue.id)) {
|
|
|
+ this.$modal.msg("请选择品牌")
|
|
|
+ } else {
|
|
|
+ this.onsubmit(e);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.onsubmit(e);
|
|
|
}
|
|
|
|
|
|
} else if (this.objValue.enginClassValue == '表后管') {
|
|
|
//表后管 判断 材质 规格 米数 (为必须有一张照片和一个视频)
|
|
|
- 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 if (this.imgArr.length <= 0) {
|
|
|
- // this.$modal.msg('请上传照片或视频')
|
|
|
- // }
|
|
|
- // else if (this.loading == false) {
|
|
|
- // this.$modal.msg('照片或视频未上传完毕,无法提交!')
|
|
|
- // }
|
|
|
- else {
|
|
|
- if (e == 'submit') {
|
|
|
-
|
|
|
+ if (e == 'submit') {
|
|
|
+ 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 {
|
|
|
const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
|
|
|
'.png') || item
|
|
|
.endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
|
|
@@ -1313,34 +1323,35 @@
|
|
|
} else {
|
|
|
this.$modal.msg('请至少上传一张照片和一个视频')
|
|
|
}
|
|
|
- } else {
|
|
|
-
|
|
|
- //暂存
|
|
|
- this.againSubmitBHG();
|
|
|
}
|
|
|
+ } else {
|
|
|
+
|
|
|
+ //暂存
|
|
|
+ this.againSubmitBHG();
|
|
|
+
|
|
|
}
|
|
|
} else if (this.objValue.enginClassValue == '阀管') {
|
|
|
//阀管 判断 材质 规格 米数
|
|
|
- if (this.isEmpty(this.doorValue.dictValue)) {
|
|
|
- this.$modal.msg("请选择上门类型")
|
|
|
- } 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 {
|
|
|
-
|
|
|
- if (this.isEmpty(this.inputDecimalNumberValue)) {
|
|
|
- this.inputNumberValue = this.inputIntegerNumberValue;
|
|
|
+ if (e == 'submit') {
|
|
|
+ if (this.isEmpty(this.doorValue.dictValue)) {
|
|
|
+ this.$modal.msg("请选择上门类型")
|
|
|
+ } 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 {
|
|
|
- this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
|
|
|
+
|
|
|
+ if (this.isEmpty(this.inputDecimalNumberValue)) {
|
|
|
+ this.inputNumberValue = this.inputIntegerNumberValue;
|
|
|
+ } else {
|
|
|
+ this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
|
|
|
+ }
|
|
|
+ this.onsubmit(e);
|
|
|
}
|
|
|
- this.onsubmit(e);
|
|
|
+ } else {
|
|
|
+ this.onsubmit(e); //暂存
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1551,7 +1562,10 @@
|
|
|
|
|
|
}
|
|
|
} else if (this.objValue.enginClassValue == '阀管') { //自闭阀
|
|
|
- var onlyNumbers = this.specificationValue.name.replace(/[^\d.]/g, '');
|
|
|
+ if (!this.isEmpty(this.specificationValue.name)) {
|
|
|
+ var onlyNumbers = this.specificationValue.name.replace(/[^\d.]/g, '');
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
param = {
|
|
|
district: this.XZQValue.dictValue,
|
|
@@ -1692,6 +1706,12 @@
|
|
|
.enginClassValue == '表后管') {
|
|
|
this.materialValue.id = dataJson.zEngineeringMaterialBo[0].materialQuality;
|
|
|
|
|
|
+ if (!this.isEmpty(this.materialValue.id) && this.materialValue.id != null) {
|
|
|
+ //根据材质ID 获取规格数据
|
|
|
+ getEnginSpecificationsList(this.materialValue.id).then(res => {
|
|
|
+ this.materialList = res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
this.specificationValue.id = dataJson
|
|
|
.zEngineeringMaterialBo[0]
|
|
|
.specifications;
|
|
@@ -1699,11 +1719,14 @@
|
|
|
.materialQualityName;
|
|
|
this.specificationValue.name = dataJson
|
|
|
.zEngineeringMaterialBo[0].specificationsName;
|
|
|
- this.inputIntegerNumberValue = this.getIntegerPart(
|
|
|
- dataJson
|
|
|
- .zEngineeringMaterialBo[0].number, 0);
|
|
|
- this.inputDecimalNumberValue = this.getIntegerPart(dataJson
|
|
|
- .zEngineeringMaterialBo[0].number, 1);
|
|
|
+ if (dataJson.zEngineeringMaterialBo[0].number != null) {
|
|
|
+ this.inputIntegerNumberValue = this.getIntegerPart(
|
|
|
+ dataJson
|
|
|
+ .zEngineeringMaterialBo[0].number, 0);
|
|
|
+ this.inputDecimalNumberValue = this.getIntegerPart(dataJson
|
|
|
+ .zEngineeringMaterialBo[0].number, 1);
|
|
|
+ }
|
|
|
+
|
|
|
} else if (this.objValue.enginClassValue == '报警器' || this.objValue
|
|
|
.enginClassValue == '切断阀' || this.objValue
|
|
|
.enginClassValue == '挂表') {
|
|
@@ -1730,6 +1753,12 @@
|
|
|
this.materialValue.id = dataJson
|
|
|
.zEngineeringMaterialBo[0]
|
|
|
.materialQuality;
|
|
|
+ if (!this.isEmpty(this.materialValue.id) && this.materialValue.id != null) {
|
|
|
+ //根据材质ID 获取规格数据
|
|
|
+ getEnginSpecificationsList(this.materialValue.id).then(res => {
|
|
|
+ this.materialList = res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
this.specificationValue.id = dataJson
|
|
|
.zEngineeringMaterialBo[0]
|
|
|
.specifications;
|