|
@@ -307,7 +307,7 @@ import EngineePipe from '@/components/EngineePipe'
|
|
|
import { checkPositiveInteger, validPhoneMobile } from '@/api/rules'
|
|
|
import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
|
|
|
import { getEnginMaterialQualityList } from '@/api/zdsz/enginee'
|
|
|
-import { getEnginSpecificationsList } from '@/api/zdsz/enginSpecifications'
|
|
|
+import { getEnginSpecificationsList, getEnginSpecificationsListAll } from '@/api/zdsz/enginSpecifications'
|
|
|
|
|
|
export default {
|
|
|
name: "openrepair",
|
|
@@ -481,14 +481,15 @@ export default {
|
|
|
methods: {
|
|
|
// 验证正整数(不包含0的正整数)
|
|
|
checkPositiveInteger,
|
|
|
+ // 根据所选材质获取对应规格
|
|
|
getEnginSpecificationsList(item, index){
|
|
|
- let materialId = item.materialQuality
|
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo[index].specifications = null
|
|
|
// 根据材质ID获取材质规格
|
|
|
- getEnginSpecificationsList({ materialId }).then(res => {
|
|
|
+ getEnginSpecificationsList(item.materialQuality).then(res => {
|
|
|
this.specificationsList = res.data
|
|
|
})
|
|
|
},
|
|
|
+ // 添加用料信息
|
|
|
addzEngineeringMaterialBo(){
|
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.push({
|
|
|
materialQuality: '', // 用料材质
|
|
@@ -496,6 +497,7 @@ export default {
|
|
|
number: '' // 用料数量
|
|
|
})
|
|
|
},
|
|
|
+ // 删除用料信息
|
|
|
removezEngineeringMaterialBo(index){
|
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.splice(index, 1)
|
|
|
},
|
|
@@ -530,20 +532,29 @@ export default {
|
|
|
}).then(res => {
|
|
|
try {
|
|
|
this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
|
|
|
- console.log('当前历史数据',this.currentCollapses)
|
|
|
} catch (error) {
|
|
|
this.currentCollapses = [];
|
|
|
}
|
|
|
- console.log(this.currentCollapses)
|
|
|
})
|
|
|
},
|
|
|
nodeCancel() {
|
|
|
this.nodeDetailVisible = false
|
|
|
+ // 反向赋值 - 为了让附件回显
|
|
|
+ this.$refs.obsFileUpload.fileList =this.form.files
|
|
|
},
|
|
|
+ // 填写施工信息
|
|
|
toNodeDetail() {
|
|
|
+ this.form.files = this.$refs.obsFileUpload.fileList;
|
|
|
+ if (this.form.files.length === 0){
|
|
|
+ this.$message.warning( '必须上传附件!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 获取全部工程材质规格
|
|
|
+ getEnginSpecificationsListAll().then(res => {
|
|
|
+ this.specificationsList = res.data
|
|
|
+ })
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.form.files = this.$refs.obsFileUpload.fileList
|
|
|
this.nodeDetailVisible = true
|
|
|
}
|
|
|
})
|
|
@@ -630,11 +641,6 @@ export default {
|
|
|
this.$refs["nodeForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id == null) {
|
|
|
- console.log(this.form)
|
|
|
- // this.form.zEngineeringNodeBo = this.zEngineeringInfoBo
|
|
|
- // this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
|
|
|
- // this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.form.zEngineeringNodeBo.zEngiineeringPhotoBoList
|
|
|
- // this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.form.zEngineeringNodeBo.zEngineeringMaterialBo
|
|
|
addEngineeEngineeIndustry(this.form).then(res => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
@@ -642,10 +648,6 @@ export default {
|
|
|
this.getList();
|
|
|
})
|
|
|
} else {
|
|
|
- // this.form.zEngineeringNodeBo = this.zEngineeringInfoBo
|
|
|
- // this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
|
|
|
- // this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.form.zEngineeringNodeBo.zEngiineeringPhotoBoList
|
|
|
- // this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.form.zEngineeringNodeBo.zEngineeringMaterialBo
|
|
|
EditEngineeEngineeIndustry(this.form).then(res => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|