|
@@ -106,7 +106,14 @@
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
size="mini"
|
|
size="mini"
|
|
@click="viewSource(scope.row)"
|
|
@click="viewSource(scope.row)"
|
|
- >历史</el-button>
|
|
|
|
|
|
+ >历史
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button type="text"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="addzEngineeringMaterBo(scope.row)"
|
|
|
|
+ >新增用料信息
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -176,28 +183,34 @@
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="附件" prop="files" v-if="currentType==='put'" style="width: 100%">
|
|
<el-form-item label="附件" prop="files" v-if="currentType==='put'" style="width: 100%">
|
|
- <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999" :value="form.pics"
|
|
|
|
|
|
+ <ObsFileUpload ref="obsFileUpload" :file-size="100"
|
|
|
|
+ :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"
|
|
|
|
+ :value="form.pics"
|
|
></ObsFileUpload>
|
|
></ObsFileUpload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="附件" prop="files" v-if="currentType==='add'" style="width: 100%">
|
|
<el-form-item label="附件" prop="files" v-if="currentType==='add'" style="width: 100%">
|
|
- <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999" :value="form.files"
|
|
|
|
|
|
+ <ObsFileUpload ref="obsFileUpload" :file-size="100"
|
|
|
|
+ :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"
|
|
|
|
+ :value="form.files"
|
|
></ObsFileUpload>
|
|
></ObsFileUpload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <div style="width: 20%; float: right">
|
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">填写施工信息</el-button>
|
|
|
|
|
|
+ <div style="width: 25%; float: right">
|
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
|
|
|
|
+ <el-button type="primary" @click="toNodeDetail">填写施工信息</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 施工信息dialog -->
|
|
<!-- 施工信息dialog -->
|
|
- <el-dialog :visible.sync="nodeDetailVisible" title="施工信息" append-to-body customClass="appendElNodeDialog" width="70% !important">
|
|
|
|
|
|
+ <el-dialog :visible.sync="nodeDetailVisible" title="施工信息" append-to-body customClass="appendElNodeDialog"
|
|
|
|
+ width="70% !important">
|
|
<!-- 节点表单 -->
|
|
<!-- 节点表单 -->
|
|
- <el-form ref="nodeForm" :model="form.zEngineeringNodeBo.zEngineeringInfoBo" :rules="nodeRules" label-width="200px">
|
|
|
|
|
|
+ <el-form ref="nodeForm" :model="zEngineeringNodeBo.zEngineeringInfoBo" :rules="nodeRules" label-width="200px">
|
|
<el-form-item label="施工时间" prop="constructTime">
|
|
<el-form-item label="施工时间" prop="constructTime">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
- v-model="form.zEngineeringNodeBo.zEngineeringInfoBo.constructTime"
|
|
|
|
|
|
+ v-model="zEngineeringNodeBo.zEngineeringInfoBo.constructTime"
|
|
value-format="yyyy-MM-dd hh:mm:ss"
|
|
value-format="yyyy-MM-dd hh:mm:ss"
|
|
type="datetime"
|
|
type="datetime"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -205,23 +218,36 @@
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="施工人" prop="constructUser" v-if="form.id">
|
|
<el-form-item label="施工人" prop="constructUser" v-if="form.id">
|
|
- <el-input v-model="form.zEngineeringNodeBo.zEngineeringInfoBo.constructUser" placeholder="请填写施工人" maxlength="20" disabled></el-input>
|
|
|
|
|
|
+ <el-input v-model="zEngineeringNodeBo.zEngineeringInfoBo.constructUser" placeholder="请填写施工人"
|
|
|
|
+ maxlength="20" disabled></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-row>
|
|
<el-row>
|
|
<el-form-item label="照片" prop="zEngiineeringPhotoBoList" style="width: 100%;">
|
|
<el-form-item label="照片" prop="zEngiineeringPhotoBoList" style="width: 100%;">
|
|
- <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']" :value="form.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList"
|
|
|
|
|
|
+ <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
|
|
|
|
+ :value="zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList"
|
|
@input="getUrl"></ObsImageUpload>
|
|
@input="getUrl"></ObsImageUpload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row v-for="(item, index) in form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo" :key="index" >
|
|
|
|
- <el-col :span="7" >
|
|
|
|
|
|
+ <div style="width: 25%; float: right">
|
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
|
|
|
|
+ <el-button @click="nodeCancel">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <!-- 用料信息dialog -->
|
|
|
|
+ <el-dialog :visible.sync="MaterVisible" title="用料信息" >
|
|
|
|
+ <el-form ref="MaterForm">
|
|
|
|
+ <el-row v-for="(item, index) in zEngineeringMaterialBo" :key="index">
|
|
|
|
+ <el-col :span="6">
|
|
<el-form-item
|
|
<el-form-item
|
|
:prop="`zEngineeringMaterialBo.${index}.materialQuality`"
|
|
:prop="`zEngineeringMaterialBo.${index}.materialQuality`"
|
|
:rules="{ required:true, validator: validateState, trigger: 'blur', index:index }"
|
|
:rules="{ required:true, validator: validateState, trigger: 'blur', index:index }"
|
|
- label-width="auto"
|
|
|
|
|
|
+ label-width="50px"
|
|
label="材质"
|
|
label="材质"
|
|
|
|
+ style="margin-right: 15px"
|
|
>
|
|
>
|
|
- <el-select v-model="item.materialQuality" placeholder="请选择材质" style="width: 70%" @change="getEnginSpecificationsList(item, index)">
|
|
|
|
|
|
+ <el-select v-model="item.materialQuality" placeholder="请选择材质"
|
|
|
|
+ @change="getEnginSpecificationsList(item, index)">
|
|
<el-option
|
|
<el-option
|
|
v-for="e in materialQualityList"
|
|
v-for="e in materialQualityList"
|
|
:key="e.id"
|
|
:key="e.id"
|
|
@@ -231,16 +257,17 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="7" >
|
|
|
|
|
|
+ <el-col :span="6">
|
|
<el-form-item
|
|
<el-form-item
|
|
:prop="`zEngineeringMaterialBo.${index}.specifications`"
|
|
:prop="`zEngineeringMaterialBo.${index}.specifications`"
|
|
:rules="{ required:true, validator: validateSize, trigger: 'blur', index:index }"
|
|
:rules="{ required:true, validator: validateSize, trigger: 'blur', index:index }"
|
|
- label-width="auto"
|
|
|
|
|
|
+ label-width="50px"
|
|
|
|
+ style="margin-right: 15px"
|
|
label="规格"
|
|
label="规格"
|
|
>
|
|
>
|
|
- <el-select v-model="item.specifications" placeholder="请选择规格" style="width: 70%">
|
|
|
|
|
|
+ <el-select v-model="item.specifications" placeholder="请选择规格" >
|
|
<el-option
|
|
<el-option
|
|
- v-for="e in specificationsList"
|
|
|
|
|
|
+ v-for="e in zEngineeringMaterialBo.specifications"
|
|
:key="e.id"
|
|
:key="e.id"
|
|
:label="e.name"
|
|
:label="e.name"
|
|
:value="e.id"
|
|
:value="e.id"
|
|
@@ -248,30 +275,33 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="7" >
|
|
|
|
|
|
+ <el-col :span="6">
|
|
<el-form-item
|
|
<el-form-item
|
|
:prop="`zEngineeringMaterialBo.${index}.number`"
|
|
:prop="`zEngineeringMaterialBo.${index}.number`"
|
|
:rules="{ required:true, validator: validateNumber, trigger: 'blur', index:index }"
|
|
:rules="{ required:true, validator: validateNumber, trigger: 'blur', index:index }"
|
|
- label-width="auto"
|
|
|
|
|
|
+ label-width="50px"
|
|
|
|
+ style="margin-right: 15px"
|
|
label="数量"
|
|
label="数量"
|
|
>
|
|
>
|
|
- <div class="block" style="display: inline-block; margin-right: 20px;">
|
|
|
|
- <el-input v-model="item.number" placeholder="请输入数量" style="width: 100%" maxlength="8"/>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <el-input v-model="item.number" placeholder="请输入数量" maxlength="8" type="number"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-col :span="3">
|
|
- <el-form-item style="margin-left: -120px;">
|
|
|
|
- <el-button v-if="form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.length > 1" @click="removezEngineeringMaterialBo(index)">
|
|
|
|
|
|
+ <el-form-item style="margin-left: 100px">
|
|
|
|
+ <el-button v-if="zEngineeringMaterialBo.length > 1" @click="removezEngineeringMaterialBo(index)" type="danger">
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <div style="width: 25%; float: right">
|
|
|
|
- <el-button @click="addzEngineeringMaterialBo">新增用料信息</el-button>
|
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
|
|
|
|
- <el-button @click="nodeCancel">取 消</el-button>
|
|
|
|
|
|
+ <div style="text-align: right;">
|
|
|
|
+ <el-button
|
|
|
|
+ @click="addzEngineeringMaterialBo"
|
|
|
|
+ >新增用料信息
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button type="primary" @click="updateMaterBo">
|
|
|
|
+ 提交
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -288,17 +318,17 @@ import {
|
|
EditEngineeEngineeIndustry,
|
|
EditEngineeEngineeIndustry,
|
|
getEngineeIndustryList,
|
|
getEngineeIndustryList,
|
|
putEngineeEngineeIndustry,
|
|
putEngineeEngineeIndustry,
|
|
- QueryEngineeIndustry
|
|
|
|
|
|
+ QueryEngineeIndustry, UpdateEngineeIndustry
|
|
} from '@/api/zdsz/engineeringIndustry'
|
|
} from '@/api/zdsz/engineeringIndustry'
|
|
import EngineePipe from '@/components/EngineePipe'
|
|
import EngineePipe from '@/components/EngineePipe'
|
|
-import { validPhoneMobile } from '@/api/rules'
|
|
|
|
|
|
+import {validPhoneMobile} from '@/api/rules'
|
|
import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
|
|
import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
|
|
-import { getEnginMaterialQualityList } from '@/api/zdsz/enginee'
|
|
|
|
-import { getEnginSpecificationsList } from '@/api/zdsz/enginSpecifications'
|
|
|
|
|
|
+import {getEnginMaterialQualityList} from '@/api/zdsz/enginee'
|
|
|
|
+import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "openrepair",
|
|
name: "openrepair",
|
|
- dicts: ['pass_check', 'is_repair', 'industry_engin_type', 'self_closing_valve_type', 'visit_type', 'engin_classification','engineering_infrastructure'],
|
|
|
|
|
|
+ dicts: ['pass_check', 'is_repair', 'industry_engin_type', 'self_closing_valve_type', 'visit_type', 'engin_classification', 'engineering_infrastructure'],
|
|
components: {
|
|
components: {
|
|
ConstructionDetails,
|
|
ConstructionDetails,
|
|
EngineePipe
|
|
EngineePipe
|
|
@@ -308,8 +338,8 @@ export default {
|
|
const validatePicPass = (rule, value, callback) => {
|
|
const validatePicPass = (rule, value, callback) => {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
// 至少有一个图片、一个创建时间
|
|
// 至少有一个图片、一个创建时间
|
|
- if (this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList.length !== 0
|
|
|
|
- && (this.form.zEngineeringNodeBo.zEngineeringInfoBo.constructTime !== null || undefined)) {
|
|
|
|
|
|
+ if (this.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList.length !== 0
|
|
|
|
+ && (this.zEngineeringNodeBo.zEngineeringInfoBo.constructTime !== null || undefined)) {
|
|
resolve(true)
|
|
resolve(true)
|
|
} else {
|
|
} else {
|
|
reject(new Error('no pass'))
|
|
reject(new Error('no pass'))
|
|
@@ -333,44 +363,41 @@ export default {
|
|
engineeType: true,
|
|
engineeType: true,
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
- currentNode:[],
|
|
|
|
- currentCollapses:[],
|
|
|
|
|
|
+ currentNode: [],
|
|
|
|
+ currentCollapses: [],
|
|
// 市政工程|工业工程表格数据
|
|
// 市政工程|工业工程表格数据
|
|
comprehensiveList: [],
|
|
comprehensiveList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
- nodeList:[],
|
|
|
|
|
|
+ nodeList: [],
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
enginName: '', // 工程名称
|
|
enginName: '', // 工程名称
|
|
enginClassification: '', // 工程分类
|
|
enginClassification: '', // 工程分类
|
|
- zEngineeringNodeBo: {
|
|
|
|
- type: '',
|
|
|
|
- zEngineeringInfoBo: {}, //施工信息
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
nodeDetailVisible: false, // 施工信息dialog
|
|
nodeDetailVisible: false, // 施工信息dialog
|
|
|
|
+ MaterVisible: false, // 用料信息dialog
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {
|
|
form: {
|
|
- files:[], // 附件
|
|
|
|
- pics:[], // 附件返回
|
|
|
|
- type:'', // 用来区分工业工程、市政工程
|
|
|
|
- enginName:'', // 工程名称
|
|
|
|
- enginType:'', // 工程类型
|
|
|
|
- constructUnit:'', // 建筑单位
|
|
|
|
- projectHead:'', // 项目负责人
|
|
|
|
- sceneHead:'', // 现场负责人
|
|
|
|
- designUnit:'', // 设计单位
|
|
|
|
- designHead:'', // 设计负责人
|
|
|
|
- designPhone:'', // 设计联系电话
|
|
|
|
- supervisionUnit:'', // 监理单位
|
|
|
|
- supervisionHead:'', // 监理负责人
|
|
|
|
- supervisionPhone:'', // 监理联系电话
|
|
|
|
- enginClassification:'', // 工程分类
|
|
|
|
- zEngineeringNodeBo:{ // 工程节点
|
|
|
|
- type:'', // 节点类型
|
|
|
|
|
|
+ files: [], // 附件
|
|
|
|
+ pics: [], // 附件返回
|
|
|
|
+ type: '', // 用来区分工业工程、市政工程
|
|
|
|
+ enginName: '', // 工程名称
|
|
|
|
+ enginType: '', // 工程类型
|
|
|
|
+ constructUnit: '', // 建筑单位
|
|
|
|
+ projectHead: '', // 项目负责人
|
|
|
|
+ sceneHead: '', // 现场负责人
|
|
|
|
+ designUnit: '', // 设计单位
|
|
|
|
+ designHead: '', // 设计负责人
|
|
|
|
+ designPhone: '', // 设计联系电话
|
|
|
|
+ supervisionUnit: '', // 监理单位
|
|
|
|
+ supervisionHead: '', // 监理负责人
|
|
|
|
+ supervisionPhone: '', // 监理联系电话
|
|
|
|
+ enginClassification: '', // 工程分类
|
|
|
|
+ zEngineeringNodeBo: { // 工程节点
|
|
|
|
+ type: '', // 节点类型
|
|
zEngineeringInfoBo: { // 施工信息
|
|
zEngineeringInfoBo: { // 施工信息
|
|
constructUser: '', // 施工人
|
|
constructUser: '', // 施工人
|
|
constructTime: '', // 施工时间
|
|
constructTime: '', // 施工时间
|
|
@@ -385,6 +412,21 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ zEngineeringMaterialBo: [ // 用料对象
|
|
|
|
+ {
|
|
|
|
+ materialQuality: '', // 用料材质
|
|
|
|
+ specifications: '', // 用料规格
|
|
|
|
+ number: '' // 用料数量
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ zEngineeringNodeBo: { // 工程节点
|
|
|
|
+ type: '', // 节点类型
|
|
|
|
+ zEngineeringInfoBo: { // 施工信息
|
|
|
|
+ constructUser: '', // 施工人
|
|
|
|
+ constructTime: '', // 施工时间
|
|
|
|
+ zEngiineeringPhotoBoList: [], // 图片列表
|
|
|
|
+ }
|
|
|
|
+ },
|
|
EngineepipeType: [], // 工程类型
|
|
EngineepipeType: [], // 工程类型
|
|
materialQualityList: [], // 用料材质List
|
|
materialQualityList: [], // 用料材质List
|
|
specificationsList: [], // 用料规格List
|
|
specificationsList: [], // 用料规格List
|
|
@@ -438,14 +480,11 @@ export default {
|
|
// 节点规则校验
|
|
// 节点规则校验
|
|
nodeRules: {
|
|
nodeRules: {
|
|
constructTime: [
|
|
constructTime: [
|
|
- {required: true, message: "施工时间不能为空", trigger: 'change', validator: validatePicPass}
|
|
|
|
|
|
+ {required: true, message: "施工时间不能为空", trigger: ['change','blur']}
|
|
],
|
|
],
|
|
zEngiineeringPhotoBoList: [
|
|
zEngiineeringPhotoBoList: [
|
|
- {required: true, message: "图片不能为空", trigger: 'change', validator: validatePicPass}
|
|
|
|
|
|
+ {required: true, message: "图片不能为空", trigger: ['change','blur'], validator: validatePicPass}
|
|
],
|
|
],
|
|
- zEngineeringMaterialBo:[
|
|
|
|
- {required: true, message: "不能为空", trigger: 'change', validator: validatePicPass}
|
|
|
|
- ]
|
|
|
|
},
|
|
},
|
|
currentType: null, // 附件组件类型 put修改 add新增
|
|
currentType: null, // 附件组件类型 put修改 add新增
|
|
};
|
|
};
|
|
@@ -460,63 +499,78 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
// 手动渲染
|
|
// 手动渲染
|
|
- setInterval(() =>{
|
|
|
|
|
|
+ setInterval(() => {
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
- },500)
|
|
|
|
|
|
+ }, 500)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- validateState(rule,value,callback){
|
|
|
|
|
|
+ validateState(rule, value, callback) {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
- if (value !==null && value !== undefined && value !== '' && value !== 0)
|
|
|
|
- {
|
|
|
|
|
|
+ if (value !== null && value !== undefined && value !== '' && value !== 0) {
|
|
resolve(true)
|
|
resolve(true)
|
|
} else {
|
|
} else {
|
|
return callback(new Error('材质不能为空'))
|
|
return callback(new Error('材质不能为空'))
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- validateSize(rule,value,callback){
|
|
|
|
|
|
+ validateSize(rule, value, callback) {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
- if (value !==null && value !== undefined && value !== '' && value !== 0)
|
|
|
|
- {
|
|
|
|
|
|
+ if (value !== null && value !== undefined && value !== '' && value !== 0) {
|
|
resolve(true)
|
|
resolve(true)
|
|
} else {
|
|
} else {
|
|
return callback(new Error('规格不能为空'))
|
|
return callback(new Error('规格不能为空'))
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- validateNumber(rule,value,callback){
|
|
|
|
|
|
+ validateNumber(rule, value, callback,index) {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
- console.log("·························")
|
|
|
|
- console.log(value);
|
|
|
|
|
|
+ const value = this.zEngineeringMaterialBo[rule.index].number
|
|
// 至少有一个图片、一个用料信息、一个创建时间
|
|
// 至少有一个图片、一个用料信息、一个创建时间
|
|
- if (value !==null && value !== undefined && value !== '' && value !== 0 && !isNaN(value))
|
|
|
|
- {
|
|
|
|
|
|
+ if(value){
|
|
resolve(true)
|
|
resolve(true)
|
|
- } else {
|
|
|
|
- return callback(new Error('数量不能为空且只能为数字'))
|
|
|
|
|
|
+ }else{
|
|
|
|
+ return callback(new Error('数量不能为空'))
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 根据所选材质获取对应规格
|
|
// 根据所选材质获取对应规格
|
|
- getEnginSpecificationsList(item, index){
|
|
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo[index].specifications = null
|
|
|
|
|
|
+ getEnginSpecificationsList(item, index) {
|
|
|
|
+ this.zEngineeringMaterialBo[index].specifications = null
|
|
// 根据材质ID获取材质规格
|
|
// 根据材质ID获取材质规格
|
|
getEnginSpecificationsList(item.materialQuality).then(res => {
|
|
getEnginSpecificationsList(item.materialQuality).then(res => {
|
|
- this.specificationsList = res.data
|
|
|
|
|
|
+ this.zEngineeringMaterialBo.specifications = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 添加用料信息
|
|
|
|
- addzEngineeringMaterialBo(){
|
|
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.push({
|
|
|
|
- materialQuality: '', // 用料材质
|
|
|
|
|
|
+ //添加用料信息
|
|
|
|
+ addzEngineeringMaterBo(row){
|
|
|
|
+ const id = row.id
|
|
|
|
+ putEngineeEngineeIndustry(id).then(response => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ this.form = response.data
|
|
|
|
+ this.form.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
|
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
|
+ this.zEngineeringMaterialBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0].zEngineeringMaterialBo
|
|
|
|
+ this.MaterVisible = true;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ updateMaterBo(){
|
|
|
|
+ this.form.files = this.form.pics
|
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
|
|
|
|
+ UpdateEngineeIndustry(this.form).then(res => {
|
|
|
|
+ this.MaterVisible = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //新增用料信息
|
|
|
|
+ addzEngineeringMaterialBo() {
|
|
|
|
+ this.zEngineeringMaterialBo.push({
|
|
|
|
+ // materialQuality: '', // 用料材质
|
|
specifications: '', // 用料规格
|
|
specifications: '', // 用料规格
|
|
number: '' // 用料数量
|
|
number: '' // 用料数量
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 删除用料信息
|
|
// 删除用料信息
|
|
- removezEngineeringMaterialBo(index){
|
|
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.splice(index, 1)
|
|
|
|
|
|
+ removezEngineeringMaterialBo(index) {
|
|
|
|
+ this.zEngineeringMaterialBo.splice(index, 1)
|
|
},
|
|
},
|
|
// 根据url获取type节点类型
|
|
// 根据url获取type节点类型
|
|
getType() {
|
|
getType() {
|
|
@@ -526,8 +580,11 @@ export default {
|
|
if (type) {
|
|
if (type) {
|
|
this.form.type = type;
|
|
this.form.type = type;
|
|
this.form.zEngineeringNodeBo.type = (type === '1' ? "工业工程" : "市政工程")
|
|
this.form.zEngineeringNodeBo.type = (type === '1' ? "工业工程" : "市政工程")
|
|
- this.EngineepipeType = (type === '1' ? [{ value: '小微商服', label: '小微商服' },{ value: '新建工业', label: '新建工业' },{ value: '改造工业', label: '改造工业' }]
|
|
|
|
- : [{ value: '气源', label: '气源' },{ value: '排迁', label: '排迁' }])
|
|
|
|
|
|
+ this.EngineepipeType = (type === '1' ? [{value: '小微商服', label: '小微商服'}, {
|
|
|
|
+ value: '新建工业',
|
|
|
|
+ label: '新建工业'
|
|
|
|
+ }, {value: '改造工业', label: '改造工业'}]
|
|
|
|
+ : [{value: '气源', label: '气源'}, {value: '排迁', label: '排迁'}])
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 新增顶管工程
|
|
// 新增顶管工程
|
|
@@ -535,17 +592,17 @@ export default {
|
|
this.$refs.enginPipe.openDialog({
|
|
this.$refs.enginPipe.openDialog({
|
|
id: data.id,
|
|
id: data.id,
|
|
type: this.form.zEngineeringNodeBo.type
|
|
type: this.form.zEngineeringNodeBo.type
|
|
- }, 'add',data)
|
|
|
|
|
|
+ }, 'add', data)
|
|
},
|
|
},
|
|
// 历史查询
|
|
// 历史查询
|
|
- viewSource(e){
|
|
|
|
|
|
+ viewSource(e) {
|
|
this.currentId = e.id
|
|
this.currentId = e.id
|
|
- this.$refs.ConstructionDetails.open(_,this.form.type)
|
|
|
|
|
|
+ this.$refs.ConstructionDetails.open(_, this.form.type)
|
|
},
|
|
},
|
|
- viewNodeSource(e){
|
|
|
|
|
|
+ viewNodeSource(e) {
|
|
// todo: 获取数据
|
|
// todo: 获取数据
|
|
QueryEngineeIndustry({
|
|
QueryEngineeIndustry({
|
|
- id:this.currentId
|
|
|
|
|
|
+ id: this.currentId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
try {
|
|
try {
|
|
this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
|
|
this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
|
|
@@ -557,21 +614,12 @@ export default {
|
|
nodeCancel() {
|
|
nodeCancel() {
|
|
this.nodeDetailVisible = false
|
|
this.nodeDetailVisible = false
|
|
// 反向赋值 - 为了让附件回显
|
|
// 反向赋值 - 为了让附件回显
|
|
- this.$refs.obsFileUpload.fileList =this.form.files
|
|
|
|
|
|
+ this.$refs.obsFileUpload.fileList = this.form.files
|
|
},
|
|
},
|
|
// 填写施工信息
|
|
// 填写施工信息
|
|
toNodeDetail() {
|
|
toNodeDetail() {
|
|
- this.form.files = this.$refs.obsFileUpload.fileList;
|
|
|
|
- if (this.form.files.length === 0){
|
|
|
|
- this.$message.warning( '必须上传附件!')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
// 根据材质id查询对应规格回显
|
|
// 根据材质id查询对应规格回显
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.forEach(item =>{
|
|
|
|
- getEnginSpecificationsList(item.materialQuality).then(res => {
|
|
|
|
- this.specificationsList = res.data
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.nodeDetailVisible = true
|
|
this.nodeDetailVisible = true
|
|
@@ -579,14 +627,14 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getUrl(url) {
|
|
getUrl(url) {
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
|
|
|
|
|
|
+ this.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
|
|
},
|
|
},
|
|
/** 查询市政工程|工业工程列表 */
|
|
/** 查询市政工程|工业工程列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
let enginType = this.form.zEngineeringNodeBo.type;
|
|
let enginType = this.form.zEngineeringNodeBo.type;
|
|
// 获取材质
|
|
// 获取材质
|
|
- getEnginMaterialQualityList({ enginType }).then(res => {
|
|
|
|
|
|
+ getEnginMaterialQualityList({enginType}).then(res => {
|
|
this.materialQualityList = res.data
|
|
this.materialQualityList = res.data
|
|
});
|
|
});
|
|
getEngineeIndustryList({
|
|
getEngineeIndustryList({
|
|
@@ -607,9 +655,9 @@ export default {
|
|
for (let formKey in this.form) {
|
|
for (let formKey in this.form) {
|
|
this.form[formKey] = null
|
|
this.form[formKey] = null
|
|
}
|
|
}
|
|
- this.form.zEngineeringNodeBo={}
|
|
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo={}
|
|
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo=[]
|
|
|
|
|
|
+ this.form.zEngineeringNodeBo = {}
|
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
|
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = []
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.push({
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.push({
|
|
materialQuality: '', // 用料材质
|
|
materialQuality: '', // 用料材质
|
|
specifications: '', // 用料规格
|
|
specifications: '', // 用料规格
|
|
@@ -636,7 +684,7 @@ export default {
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.reset();
|
|
this.reset();
|
|
- this.title = (this.form.type === '1' ? "新增工业工程":"新增市政工程");
|
|
|
|
|
|
+ this.title = (this.form.type === '1' ? "新增工业工程" : "新增市政工程");
|
|
this.currentType = 'add'
|
|
this.currentType = 'add'
|
|
this.open = true;
|
|
this.open = true;
|
|
},
|
|
},
|
|
@@ -648,15 +696,24 @@ export default {
|
|
putEngineeEngineeIndustry(id).then(response => {
|
|
putEngineeEngineeIndustry(id).then(response => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
- this.form.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
|
|
|
|
- this.form.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
|
- this.title = (this.form.type === '1' ? "修改工业工程":"修改市政工程");
|
|
|
|
|
|
+ this.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
|
|
|
|
+ this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
|
+ this.title = (this.form.type === '1' ? "修改工业工程" : "修改市政工程");
|
|
this.currentType = 'put'
|
|
this.currentType = 'put'
|
|
this.open = true;
|
|
this.open = true;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
|
|
+ this.form.files = this.$refs.obsFileUpload.fileList;
|
|
|
|
+ if (this.form.files.length === 0) {
|
|
|
|
+ this.$message.warning('必须上传附件!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
|
|
|
|
+ console.log(this.form.zEngineeringNodeBo)
|
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
|
|
this.$refs["nodeForm"].validate(valid => {
|
|
this.$refs["nodeForm"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id == null) {
|
|
if (this.form.id == null) {
|
|
@@ -667,7 +724,7 @@ export default {
|
|
this.getList();
|
|
this.getList();
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- EditEngineeEngineeIndustry(this.form).then(res => {
|
|
|
|
|
|
+ UpdateEngineeIndustry(this.form).then(res => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.nodeDetailVisible = false
|
|
this.nodeDetailVisible = false
|
|
@@ -741,9 +798,10 @@ export default {
|
|
// width: 70%;
|
|
// width: 70%;
|
|
height: 80%;
|
|
height: 80%;
|
|
|
|
|
|
- .el-select{
|
|
|
|
- width:70%
|
|
|
|
|
|
+ .el-select {
|
|
|
|
+ width: 70%
|
|
}
|
|
}
|
|
|
|
+
|
|
.el-dialog__body {
|
|
.el-dialog__body {
|
|
height: 85%;
|
|
height: 85%;
|
|
}
|
|
}
|