|
@@ -291,10 +291,10 @@ import {
|
|
|
QueryEngineeIndustry
|
|
|
} from '@/api/zdsz/engineeringIndustry'
|
|
|
import EngineePipe from '@/components/EngineePipe'
|
|
|
-import { checkPositiveInteger, validPhoneMobile } from '@/api/rules'
|
|
|
+import { validPhoneMobile } from '@/api/rules'
|
|
|
import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
|
|
|
import { getEnginMaterialQualityList } from '@/api/zdsz/enginee'
|
|
|
-import { getEnginSpecificationsList, getEnginSpecificationsListAll } from '@/api/zdsz/enginSpecifications'
|
|
|
+import { getEnginSpecificationsList } from '@/api/zdsz/enginSpecifications'
|
|
|
|
|
|
export default {
|
|
|
name: "openrepair",
|
|
@@ -307,10 +307,9 @@ export default {
|
|
|
// 自定义校验
|
|
|
const validatePicPass = (rule, value, callback) => {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- // 至少有一个图片、一个用料信息、一个创建时间
|
|
|
+ // 至少有一个图片、一个创建时间
|
|
|
if (this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList.length !== 0
|
|
|
- && (this.form.zEngineeringNodeBo.zEngineeringInfoBo.constructTime !== null || undefined)
|
|
|
- && this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.length !== 0) {
|
|
|
+ && (this.form.zEngineeringNodeBo.zEngineeringInfoBo.constructTime !== null || undefined)) {
|
|
|
resolve(true)
|
|
|
} else {
|
|
|
reject(new Error('no pass'))
|
|
@@ -499,8 +498,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 验证正整数(不包含0的正整数)
|
|
|
- checkPositiveInteger,
|
|
|
// 根据所选材质获取对应规格
|
|
|
getEnginSpecificationsList(item, index){
|
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo[index].specifications = null
|
|
@@ -569,9 +566,11 @@ export default {
|
|
|
this.$message.warning( '必须上传附件!')
|
|
|
return
|
|
|
}
|
|
|
- // 获取全部工程材质规格
|
|
|
- getEnginSpecificationsListAll().then(res => {
|
|
|
- this.specificationsList = res.data
|
|
|
+ // 根据材质id查询对应规格回显
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.forEach(item =>{
|
|
|
+ getEnginSpecificationsList(item.materialQuality).then(res => {
|
|
|
+ this.specificationsList = res.data
|
|
|
+ })
|
|
|
})
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|