|
@@ -6,7 +6,8 @@
|
|
|
-->
|
|
|
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
+ <div style="width: 100%;height: 100%;">
|
|
|
+ <el-dialog
|
|
|
:visible.sync="dialogVisible"
|
|
|
title=""
|
|
|
width="60%"
|
|
@@ -43,7 +44,7 @@
|
|
|
<hr>
|
|
|
<!-- 用料明细 -->
|
|
|
<div
|
|
|
- v-for="(i,index) in e.zEngineeringMaterialBo"
|
|
|
+ v-for="(i,index) in e.zEngineeringMaterialBo || [] "
|
|
|
:key="index"
|
|
|
>
|
|
|
<el-form :model="nodeInfo" class="nodeForm">
|
|
@@ -52,11 +53,10 @@
|
|
|
label-width="50px"
|
|
|
label="材质"
|
|
|
v-show="i.materialQuality != null"
|
|
|
-
|
|
|
>
|
|
|
<!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
|
|
|
<!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
|
|
|
- <el-select v-model="i.materialQuality" placeholder="请选择材质" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
|
|
|
+ <el-select v-model="i.materialQuality" placeholder="请选择材质" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
|
|
|
<el-option
|
|
|
v-for="e in materialQualityList"
|
|
|
:key="e.id"
|
|
@@ -72,7 +72,7 @@
|
|
|
v-show="i.specifications != null"
|
|
|
|
|
|
>
|
|
|
- <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
|
|
|
+ <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
|
|
|
<el-option
|
|
|
v-for="e in specificationsList"
|
|
|
:key="e.id"
|
|
@@ -82,13 +82,13 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
- :prop="i.number"
|
|
|
+ :prop="i.number + ''"
|
|
|
label-width="50px"
|
|
|
label="数量"
|
|
|
-
|
|
|
+ v-show="i.number != null"
|
|
|
>
|
|
|
<div class="block" style="display: inline-block; margin-right: 20px;">
|
|
|
- <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" maxlength="8" type="number"/>
|
|
|
+ <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" :disabled="status == 'read-only' "/>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -100,7 +100,7 @@
|
|
|
>
|
|
|
<!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
|
|
|
<!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
|
|
|
- <el-select v-model="i.corrosionLevel" placeholder="请选择腐蚀等级" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
|
|
|
+ <el-select v-model="i.corrosionLevel" placeholder="请选择腐蚀等级" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
|
|
|
<el-option
|
|
|
v-for="e in corrosionLevelList"
|
|
|
:key="e.dictValue"
|
|
@@ -118,7 +118,7 @@
|
|
|
>
|
|
|
<!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
|
|
|
<!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
|
|
|
- <el-select v-model="i.visitType" placeholder="请选择上门类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
|
|
|
+ <el-select v-model="i.visitType" placeholder="请选择上门类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
|
|
|
<el-option
|
|
|
v-for="e in dict.type.visit_type"
|
|
|
:key="e.value"
|
|
@@ -136,7 +136,7 @@
|
|
|
>
|
|
|
<!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
|
|
|
<!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
|
|
|
- <el-select v-model="i.selfClosingValveType" placeholder="请选择自闭阀类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
|
|
|
+ <el-select v-model="i.selfClosingValveType" placeholder="请选择自闭阀类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
|
|
|
<el-option
|
|
|
v-for="e in dict.type.self_closing_valve_type"
|
|
|
:key="e.value"
|
|
@@ -162,23 +162,65 @@
|
|
|
</div>
|
|
|
<!-- <el-form-item label="照片" :prop="e.zEngiineeringPhotoBoList" class="obsImage"> -->
|
|
|
<ObsImageUpload
|
|
|
- class="obsImageUpload"
|
|
|
+ :class=" status == 'read-only' ? '' : obsImageUpload"
|
|
|
ref="obsImageUpload"
|
|
|
:limit="9999"
|
|
|
:fileType="['png', 'jpg', 'jpeg']"
|
|
|
@input="getUrl"
|
|
|
:value="e.zEngiineeringPhotoBoList"
|
|
|
- :disabled="false"
|
|
|
+ :disabled="status == 'read-only' "
|
|
|
></ObsImageUpload>
|
|
|
<!-- </el-form-item> -->
|
|
|
<hr>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</el-tab-pane>
|
|
|
- <!-- <el-button class="check" @click="checkWorking">审核</el-button>-->
|
|
|
- <button @click="updateNodeOption">修改</button>
|
|
|
+ <button class="check" @click="checkWorking" v-if="currentStatus == 'check' && reviewStatus " style="width: 80px;border: none;">审核</button>
|
|
|
+ <button class="check" @click="updateNodeOption" style="width: 94px;border: none;cursor: pointer;" v-if="currentStatus != 'check'">修改</button>
|
|
|
</el-tabs>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 审核 -->
|
|
|
+ <el-dialog
|
|
|
+ title="审核"
|
|
|
+ :visible.sync="checkingVisible"
|
|
|
+ width="30%"
|
|
|
+ class="checkingDialog"
|
|
|
+ :before-close="handleClose">
|
|
|
+ <el-form :model="checkingInfo" ref="checking" class="nodeForm">
|
|
|
+ <el-form-item
|
|
|
+ label-width="70px"
|
|
|
+ label="审核状态"
|
|
|
+ >
|
|
|
+ <el-select v-model="checkingInfo.reviewStatus" placeholder="请选择审核状态" style="width: 100%" label="审核状态">
|
|
|
+ <el-option
|
|
|
+ v-for="e in reviewStatusList"
|
|
|
+ :key="e.label"
|
|
|
+ :label="e.label"
|
|
|
+ :value="e.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item
|
|
|
+ label-width="70px"
|
|
|
+ label="审核内容"
|
|
|
+ >
|
|
|
+ <div class="block" style="display: inline-block; margin-right: 20px;">
|
|
|
+ <el-input
|
|
|
+ v-model="checkingInfo.reviewContent"
|
|
|
+ placeholder="请输入审核内容"
|
|
|
+ type="textarea"
|
|
|
+ style="width: 100%"/>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="checkingVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click=checkingSubmit>确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -195,12 +237,22 @@ export default {
|
|
|
'self_closing_valve_type',
|
|
|
|
|
|
],
|
|
|
- props: ['currentCollapses','nodeDetailType','enginType'],
|
|
|
+ props: ['currentCollapses','nodeDetailType','enginType','status'],
|
|
|
data() {
|
|
|
return {
|
|
|
currentDicts: [], // 当前类型工程节点项
|
|
|
dialogVisible: false,
|
|
|
activeNames: '',
|
|
|
+ reviewStatusList:[
|
|
|
+ {
|
|
|
+ value:'1',
|
|
|
+ label:'通过'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value:'0',
|
|
|
+ label:'不通过'
|
|
|
+ }
|
|
|
+ ], // 审核状态option
|
|
|
corrosionLevelList:[], // 腐蚀等级option
|
|
|
materialQualityList:[], // 材质
|
|
|
specificationsList:[], // 规格
|
|
@@ -214,6 +266,14 @@ export default {
|
|
|
zEngineeringMaterialBo:[], // 用料集合
|
|
|
remark:'',
|
|
|
},
|
|
|
+ checkingInfo:{
|
|
|
+ reviewStatus:'', // 审核状态
|
|
|
+ reviewContent:'', // 审核内容
|
|
|
+ engInfoId:'', // 节点Id
|
|
|
+ createTime:'', // 工程创建时间
|
|
|
+ },
|
|
|
+ currentStatus:null,
|
|
|
+ checkingVisible:null,
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -231,6 +291,17 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ reviewStatus(){
|
|
|
+ let flag = null
|
|
|
+ try {
|
|
|
+ flag = currentCollapses[0].zEngineeringReviewBo.reviewStatus != '1' ? true : false
|
|
|
+ } catch (error) {
|
|
|
+ flag = true
|
|
|
+ }
|
|
|
+ return flag
|
|
|
+ }
|
|
|
+ },
|
|
|
watch: {
|
|
|
// 此处监听variable变量,当期有变化时执行
|
|
|
currentDicts(item1, item2) {
|
|
@@ -240,14 +311,30 @@ export default {
|
|
|
this.$parent.viewNodeSource(item1[0].value)
|
|
|
},
|
|
|
currentCollapses(){
|
|
|
- console.log(this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality)
|
|
|
- getEnginSpecificationsList({materId:this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality}).then(res => {
|
|
|
- console.log('规格',res.data)
|
|
|
- this.specificationsList = res.data
|
|
|
- })
|
|
|
+ let materialQuality = []
|
|
|
+ try {
|
|
|
+ materialQuality = this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality
|
|
|
+ } catch (error) {
|
|
|
+ materialQuality = []
|
|
|
+ }
|
|
|
+ if(materialQuality){
|
|
|
+ getEnginSpecificationsList({materId:materialQuality}).then(res => {
|
|
|
+ console.log('规格',res.data)
|
|
|
+ this.specificationsList = res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 提交审核
|
|
|
+ checkingSubmit(){
|
|
|
+ try {
|
|
|
+ this.checkingInfo.engInfoId = this.currentCollapses[0].id
|
|
|
+ } catch (error) {
|
|
|
+ this.checkingInfo.engInfoId = null
|
|
|
+ }
|
|
|
+ this.$emit('checkWorking',this.checkingInfo)
|
|
|
+ },
|
|
|
// 查看单节点历史
|
|
|
viewSource(e) {
|
|
|
console.log(this.$parent)
|
|
@@ -255,14 +342,19 @@ export default {
|
|
|
},
|
|
|
// 单项审核
|
|
|
checkWorking() {
|
|
|
-
|
|
|
+ if(this.currentStatus == 'check'){
|
|
|
+ this.checkingVisible = true
|
|
|
+ }
|
|
|
},
|
|
|
updateNodeOption(){
|
|
|
+ console.log(this.activeNames)
|
|
|
console.log('最新面板',this.currentCollapses)
|
|
|
+ this.$emit('updateNodeOption',this.currentCollapses)
|
|
|
},
|
|
|
// 查看历史
|
|
|
- open(dicts, type = null) {
|
|
|
-
|
|
|
+ open(dicts, type = null,currentStatus = null) {
|
|
|
+ this.currentStatus = currentStatus
|
|
|
+ this.checkingVisible = false
|
|
|
if (type == '1' || type == '2') {
|
|
|
// 工业 市政
|
|
|
this.$parent.viewNodeSource()
|
|
@@ -304,7 +396,6 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
::v-deep .nodeForm{
|
|
|
.el-form-item__content{
|
|
|
display: flex;
|
|
@@ -392,4 +483,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+::v-deep .checkingDialog{
|
|
|
+ height: 50%;
|
|
|
+ margin-top: 6%;
|
|
|
+ .el-dialog__body{
|
|
|
+ height: 72%;
|
|
|
+ }
|
|
|
+ .el-textarea__inner{
|
|
|
+ width: 246%;
|
|
|
+ height: 140px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|