Browse Source

Merge branch 'zdsz3.0' of http://192.168.10.18:3000/sunwei/zdsz_vue into zdsz3.0

付宇航 1 year ago
parent
commit
c73928b1e1

+ 13 - 2
src/components/ConstructionDetails/index.vue

@@ -94,6 +94,16 @@
                         <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" maxlength="11" :disabled="status == 'read-only'"></el-input>
                       </div>
                     </el-form-item>
+                    <el-form-item
+                      :prop="i.remark + ''"
+                      :class="enginType != '基建工程' && enginType != '民用工程' ? 'labelWidth' : '' "
+                      label="描述"
+                      v-show="i.remark != null"
+                      >
+                      <div class="block" style="display: inline-block; margin-right: 20px;">
+                        <el-input v-model="i.remark" placeholder="请输入" style="width: 100%"  maxlength="100" :disabled="status == 'read-only'"></el-input>
+                      </div>
+                    </el-form-item>
 
                     <el-form-item
                       :prop="i.corrosionLevel"
@@ -244,7 +254,7 @@ export default {
       'self_closing_valve_type',
 
   ],
-  props: ['currentCollapses','nodeDetailType','enginType','status'],
+  props: ['currentCollapses','nodeDetailType','enginType','status','zEngineeringNodeBo'],
   data() {
     return {
       currentDicts: [],              // 当前类型工程节点项
@@ -336,7 +346,8 @@ export default {
     // 提交审核
     checkingSubmit(){
       try {
-        this.checkingInfo.engInfoId = this.currentCollapses[0].id
+        console.log(this.currentCollapses[0])
+        this.checkingInfo.engInfoId = this.zEngineeringNodeBo.id
       } catch (error) {
         this.checkingInfo.engInfoId = null
       }

+ 6 - 3
src/views/zdsz/engineeringCivil/index.vue

@@ -432,6 +432,7 @@
     <ConstructionDetails
       ref="ConstructionDetails"
       :currentCollapses="currentCollapses"
+      :zEngineeringNodeBo="zEngineeringNodeBo"
       :type="nodeDetailType"
       @updateNodeOption="updateNodeOption"
       @checkWorking="checkWorking"
@@ -856,6 +857,7 @@ export default {
         completionStatus: undefined,
         enginClassification: undefined,
         imgUrl: undefined,
+        zEngineeringNodeBo:{},
         zEngineeringNodeBoList: {
           type: undefined,
           zEngineeringInfoBo: {
@@ -1076,6 +1078,7 @@ export default {
         try {
           this.updateParams = res.data
           this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+          this.zEngineeringNodeBo=res.data.zEngineeringNodeBo
         } catch (error) {
           this.currentCollapses = [];
         }
@@ -1373,6 +1376,7 @@ export default {
               type: 'success'
             });
             this.open = false
+            this.getList()
             console.log('选中节点集合', this.currentCheckList)
             this.currentCheckList = []
             // this.$emit('closeToSucceed')
@@ -1386,13 +1390,13 @@ export default {
               type: 'success'
             });
             this.open = false
+            this.getList()
             console.log('选中节点集合', this.currentCheckList)
             this.currentCheckList = []
             // this.$emit('closeToSucceed')
           }
         })
       }
-
       return
       getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
         this.nodeList = res.data
@@ -1435,7 +1439,7 @@ export default {
       this.reset();
       const id = row.id || this.ids
       getEngineeringCivil(id).then(res => {
-        debugger
+
         that.loading = false;
         // let newData = res.data
         // // 手动调用行政区发生改变
@@ -1456,7 +1460,6 @@ export default {
             updateEngineeringCivil(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
-              debugger
               this.getList();
             }).finally(() => {
               this.buttonLoading = false;

+ 17 - 3
src/views/zdsz/engineeringIndustry/index.vue

@@ -585,6 +585,13 @@ export default {
           zEngineeringMaterialBo: []
         },
       }
+      this.zEngineeringMaterialBo = [ // 用料对象
+        {
+          materialQuality: '', // 用料材质
+          specifications: '', // 用料规格
+          number: '' // 用料数量
+        },
+      ]
       const id = row.id
       putEngineeEngineeIndustry(id).then(response => {
         this.loading = false;
@@ -637,6 +644,7 @@ export default {
         if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
           valid = false;
         }
+
         if (valid) {
           this.zEngineeringMaterialBo.push({
             materialQuality: '', // 用料材质
@@ -784,8 +792,14 @@ export default {
       putEngineeEngineeIndustry(id).then(response => {
         this.loading = false;
         this.form = response.data;
-        this.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
-        this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
+        if (response.data.zEngineeringNodeBoList !== undefined && response.data.zEngineeringNodeBoList.length > 0) {
+          this.zEngineeringNodeBo = response.data.zEngineeringNodeBoList[0]
+          if (response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList !== undefined && response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList.length > 0) {
+            this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
+          }
+        }
+
+
         this.title = (this.form.type === '1' ? "修改工业工程" : "修改市政工程");
         this.currentType = 'put'
         this.open = true;
@@ -799,7 +813,7 @@ export default {
         this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
         this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
       }
-      debugger
+
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.files = this.$refs.obsFileUpload.fileList;