|
@@ -585,6 +585,13 @@ export default {
|
|
|
zEngineeringMaterialBo: []
|
|
|
},
|
|
|
}
|
|
|
+ this.zEngineeringMaterialBo = [ // 用料对象
|
|
|
+ {
|
|
|
+ materialQuality: '', // 用料材质
|
|
|
+ specifications: '', // 用料规格
|
|
|
+ number: '' // 用料数量
|
|
|
+ },
|
|
|
+ ]
|
|
|
const id = row.id
|
|
|
putEngineeEngineeIndustry(id).then(response => {
|
|
|
this.loading = false;
|
|
@@ -637,6 +644,7 @@ export default {
|
|
|
if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
|
|
|
valid = false;
|
|
|
}
|
|
|
+
|
|
|
if (valid) {
|
|
|
this.zEngineeringMaterialBo.push({
|
|
|
materialQuality: '', // 用料材质
|
|
@@ -784,8 +792,14 @@ export default {
|
|
|
putEngineeEngineeIndustry(id).then(response => {
|
|
|
this.loading = false;
|
|
|
this.form = response.data;
|
|
|
- this.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
|
|
|
- this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
+ if (response.data.zEngineeringNodeBoList !== undefined && response.data.zEngineeringNodeBoList.length > 0) {
|
|
|
+ this.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
|
|
|
+ if (response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList !== undefined && response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList.length > 0) {
|
|
|
+ this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
this.title = (this.form.type === '1' ? "修改工业工程" : "修改市政工程");
|
|
|
this.currentType = 'put'
|
|
|
this.open = true;
|
|
@@ -799,7 +813,7 @@ export default {
|
|
|
this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
|
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
|
|
|
}
|
|
|
- debugger
|
|
|
+
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
this.form.files = this.$refs.obsFileUpload.fileList;
|