|
@@ -79,11 +79,17 @@
|
|
|
|
|
|
>
|
|
|
<el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" :disabled="status == 'read-only' ">
|
|
|
- <el-option
|
|
|
+ <!-- <el-option
|
|
|
v-for="e in specificationsList"
|
|
|
:key="e.id"
|
|
|
:label="e.name"
|
|
|
:value="e.id"
|
|
|
+ ></el-option> -->
|
|
|
+ <el-option
|
|
|
+ v-for="e in corrosionLevelListAll.filter(e => e.materId == i.materialQuality)"
|
|
|
+ :key="e.id"
|
|
|
+ :label="e.name"
|
|
|
+ :value="e.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -95,7 +101,7 @@
|
|
|
label-width="95px"
|
|
|
>
|
|
|
<div class="block" style="display: inline-block; margin-right: 20px;">
|
|
|
- <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" maxlength="11" :disabled="status == 'read-only'"></el-input>
|
|
|
+ <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" oninput="value = value.replace(/[^\d]/g, '');if(value.length>9); value=value.slice(0,9)" max="999999999" :disabled="status == 'read-only'"></el-input>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -162,6 +168,23 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ :prop="i.brand"
|
|
|
+ label="品牌"
|
|
|
+ v-show="i.brand != null"
|
|
|
+ label-width="95px"
|
|
|
+ >
|
|
|
+ <!-- :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
|
|
|
+ <!-- <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
|
|
|
+ <el-select v-model="i.brand" placeholder="请选择品牌" style="width: 100%" :disabled="status == 'read-only' ">
|
|
|
+ <el-option
|
|
|
+ v-for="e in dict.type.brand"
|
|
|
+ :key="e.value"
|
|
|
+ :label="e.label"
|
|
|
+ :value="e.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<!-- <el-input size="mini" v-if="i.brand" style="width: 80%" v-model="i.brand" placeholder="请输入品牌">
|
|
|
<template slot="prepend">品牌</template>
|
|
@@ -206,11 +229,12 @@
|
|
|
:visible.sync="checkingVisible"
|
|
|
width="30%"
|
|
|
class="checkingDialog"
|
|
|
- :before-close="null">
|
|
|
- <el-form :model="checkingInfo" ref="checking" class="nodeForm">
|
|
|
+ :before-close="handleChecking">
|
|
|
+ <el-form :model="checkingInfo" ref="checking" :rules="checkingRule" class="nodeForm">
|
|
|
<el-form-item
|
|
|
- label-width="70px"
|
|
|
+ label-width="85px"
|
|
|
label="审核状态"
|
|
|
+ prop="reviewStatus"
|
|
|
>
|
|
|
<el-select v-model="checkingInfo.reviewStatus" placeholder="请选择审核状态" style="width: 100%" label="审核状态">
|
|
|
<el-option
|
|
@@ -223,20 +247,21 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item
|
|
|
- label-width="70px"
|
|
|
+ label-width="85px"
|
|
|
label="审核内容"
|
|
|
+ prop="reviewContent"
|
|
|
>
|
|
|
<div class="block" style="display: inline-block; margin-right: 20px;">
|
|
|
<el-input
|
|
|
v-model="checkingInfo.reviewContent"
|
|
|
placeholder="请输入审核内容"
|
|
|
type="textarea"
|
|
|
- style="width: 100%"/>
|
|
|
+ style="width: 97%"/>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="checkingVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="handleChecking">取 消</el-button>
|
|
|
<el-button type="primary" @click=checkingSubmit>确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
@@ -256,7 +281,7 @@ export default {
|
|
|
dicts:[
|
|
|
'visit_type',
|
|
|
'self_closing_valve_type',
|
|
|
-
|
|
|
+ 'brand'
|
|
|
],
|
|
|
props: ['currentCollapses','nodeDetailType','enginType','status','zEngineeringNodeBo'],
|
|
|
data() {
|
|
@@ -298,6 +323,15 @@ export default {
|
|
|
isChecking:true,
|
|
|
currentEnginId:null,
|
|
|
reviewStatus:null,
|
|
|
+ corrosionLevelListAll:[],
|
|
|
+ checkingRule:{
|
|
|
+ reviewStatus: [
|
|
|
+ {required: true, message: "审核状态不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ reviewContent: [
|
|
|
+ {required: true, message: "审核内容不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -306,6 +340,10 @@ export default {
|
|
|
console.log('材质',res)
|
|
|
this.materialQualityList = res.data
|
|
|
})
|
|
|
+ getEnginSpecificationsList().then(res => {
|
|
|
+ console.log('规格',res.data)
|
|
|
+ this.corrosionLevelListAll = res.data
|
|
|
+ })
|
|
|
// 获取腐蚀等级
|
|
|
getDictType({dictType:'corrosion_level'}).then(res => {
|
|
|
console.log('腐蚀等级',res)
|
|
@@ -354,26 +392,53 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 保存节点Id
|
|
|
- setEngineId(e){
|
|
|
- this.currentEnginId = e
|
|
|
- },
|
|
|
- // 提交审核
|
|
|
- checkingSubmit(){
|
|
|
- try {
|
|
|
- this.checkingInfo.engInfoId = this.currentEnginId
|
|
|
- this.$emit('checkWorking',this.checkingInfo)
|
|
|
- } catch (error) {
|
|
|
- this.checkingInfo.engInfoId = null
|
|
|
- }
|
|
|
- this.dialogVisible = false
|
|
|
+ handleChecking(){
|
|
|
this.checkingVisible = false
|
|
|
this.checkingInfo = {
|
|
|
reviewStatus:'', // 审核状态
|
|
|
reviewContent:'', // 审核内容
|
|
|
engInfoId:'', // 节点Id
|
|
|
createTime:'', // 工程创建时间
|
|
|
- }
|
|
|
+ },
|
|
|
+ this.$refs.checking.resetFields()
|
|
|
+ },
|
|
|
+ getSpecificationsList(id){
|
|
|
+ getEnginSpecificationsList({materId:id}).then(res => {
|
|
|
+ console.log('________a',res.data)
|
|
|
+ return res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存节点Id
|
|
|
+ setEngineId(e){
|
|
|
+ this.currentEnginId = e
|
|
|
+ },
|
|
|
+ // 提交审核
|
|
|
+ checkingSubmit(){
|
|
|
+ this.$refs.checking.validate(valid => {
|
|
|
+ if(valid){
|
|
|
+ try {
|
|
|
+ this.checkingInfo.engInfoId = this.currentEnginId
|
|
|
+ this.$emit('checkWorking',this.checkingInfo)
|
|
|
+ } catch (error) {
|
|
|
+ this.checkingInfo.engInfoId = null
|
|
|
+ }
|
|
|
+ // this.dialogVisible = false
|
|
|
+ this.checkingVisible = false
|
|
|
+ this.checkingInfo = {
|
|
|
+ reviewStatus:'', // 审核状态
|
|
|
+ reviewContent:'', // 审核内容
|
|
|
+ engInfoId:'', // 节点Id
|
|
|
+ createTime:'', // 工程创建时间
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: '请完善信息',
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ throw 'valid Failed'
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
// 查看单节点历史
|
|
|
viewSource(e) {
|