JX.Li 1 рік тому
батько
коміт
b7ebb51068

+ 7 - 0
src/api/zdsz/engineeringIndustry.js

@@ -57,6 +57,13 @@ export function QueryEngineeIndustry({id, type}) {
   })
 }
 
+export function QueryEngineeIndustrys({id, type}) {
+  return request({
+    url: `/zdsz/engineeringIndustry/query/${id}/${type}`,
+    method: 'get',
+  })
+}
+
 export function UpdateEngineeIndustry(data) {
   return request({
     url: '/zdsz/engineeringIndustry/updateNodeByBo',

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

@@ -139,7 +139,7 @@
                       :prop="i.materialQuality"
                       :class="enginType != '基建工程' && enginType != '民用工程' ? 'labelWidth' : '' "
                       :label="activeNames == '阀管' ? '灶具管厂家': '材质'"
-                      v-show="i.materialQuality != null"
+                      v-show="i.materialQuality != null||(enginClassification != null && !enginClassification.includes('调压柜'))"
                       label-width="95px"
                       >
                       <el-select  v-model="i.materialQuality" placeholder="请选择材质" style="width: 100%" @change="getEnginSpecificationsList(i, index,idx)" :disabled="status == 'read-only' ">
@@ -155,7 +155,7 @@
                       :prop="i.specifications"
                       :class="enginType != '基建工程' && enginType != '民用工程' ? 'labelWidth' : '' "
                       label="规格"
-                      v-show="i.specifications != null"
+                      v-show="i.specifications != null||(enginClassification != null && !enginClassification.includes('调压柜'))"
                       label-width="95px"
 
                       >
@@ -175,11 +175,11 @@
                       </el-select>
                     </el-form-item>
                   <el-form-item
-                    v-if="currentDicts.some(item=>item.label==='底腿')||node==='调压柜安装'"
+                    v-if="currentDicts.some(item=>item.label==='底腿')||node==='调压柜安装'||(enginClassification != null && enginClassification.includes('调压柜'))"
                     :prop="i.remark + ''"
                     :class="enginType != '基建工程' && enginType != '民用工程' ? 'labelWidth' : '' "
                     label="施工内容"
-                    v-show="currentDicts.some(item=>item.label==='底腿')||node==='调压柜安装'"
+                    v-show="currentDicts.some(item=>item.label==='底腿')||node==='调压柜安装'||(enginClassification != null && enginClassification.includes('调压柜'))"
                     label-width="95px"
                   >
                     <div class="block" style="display: inline-block; margin-right: 20px;">
@@ -224,7 +224,7 @@
                       :prop="i.number + ''"
                       :class="enginType != '基建工程' && enginType != '民用工程' ? 'labelWidth' : '' "
                       label="数量"
-                      v-show="i.number != null"
+                      v-show="i.number != null||(enginClassification != null && !enginClassification.includes('调压柜'))"
                       label-width="95px"
                       >
                       <div class="block" style="display: inline-block; margin-right: 20px;">
@@ -238,7 +238,7 @@
                       :prop="i.remark + ''"
                       :class="enginType != '基建工程' && enginType != '民用工程' ? 'labelWidth' : '' "
                       label="描述"
-                      v-show="i.remark != null&&!currentDicts.some(item=>item.label==='底腿')"
+                      v-show="i.remark != null||!currentDicts.some(item=>item.label==='底腿')"
                       >
                       <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>
@@ -331,7 +331,7 @@
                 </el-input> -->
             </div>
             <!-- <el-form-item label="照片" prop="zEngiineeringPhotoBoList" class="obsImage"> -->
-              <div style="display: flex;width: 100%;height: 100%;" v-if="!(currentDicts.some(item=>item.label==='底腿'))&&!(node==='下沟')&&!(node=='回填')&&!(node=='trench_construction')&&!(node=='underditch_construction')&&!(engineType=='pe')&&!(engineType=='iron_air')&&!(node=='调压柜安装')">
+              <div style="display: flex;width: 100%;height: 100%;" v-if="!(currentDicts.some(item=>item.label==='底腿'))&&!(node==='下沟')&&!(node=='回填')&&!(node=='trench_construction')&&!(node=='underditch_construction')&&!(engineType=='pe')&&!(engineType=='iron_air')&&!(node=='调压柜安装')&&(enginClassification != null && !enginClassification.includes('调压柜'))">
                 <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">图片</h3>
                 <ObsImageUpload
                   :class=" status == 'read-only' ? 'obsImageUploads' : '' "
@@ -667,7 +667,7 @@
                 :disabled="status == 'read-only' "
               ></ObsImageUpload>
             </div>
-            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='回填'||node==='调压柜安装'">
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='回填'||node==='调压柜安装'||(enginClassification != null && enginClassification.includes('调压柜'))">
               <h3 style="width: 95px;font-weight: 600;text-align: center;text-indent: 25px;">石粉回填照片</h3>
               <ObsImageUpload
                 :class=" status == 'read-only' ? 'obsImageUploads' : '' "
@@ -751,7 +751,7 @@
                 :disabled="status == 'read-only' "
               ></ObsImageUpload>
             </div>
-            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'">
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'||(enginClassification != null && enginClassification.includes('调压柜'))">
               <h3 style="width: 95px;font-weight: 600;text-align: center;text-indent: 25px;">调压柜铭牌</h3>
               <ObsImageUpload
                 :class=" status == 'read-only' ? 'obsImageUploads' : '' "
@@ -763,7 +763,7 @@
                 :disabled="status == 'read-only' "
               ></ObsImageUpload>
             </div>
-            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'">
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'||(enginClassification != null && enginClassification.includes('调压柜'))">
               <h3 style="width: 95px;font-weight: 600;text-align: center;text-indent: 25px;">调压箱防雷接地</h3>
               <ObsImageUpload
                 :class=" status == 'read-only' ? 'obsImageUploads' : '' "
@@ -775,7 +775,7 @@
                 :disabled="status == 'read-only' "
               ></ObsImageUpload>
             </div>
-            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'">
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'||(enginClassification != null && enginClassification.includes('调压柜'))">
               <h3 style="width: 95px;font-weight: 600;text-align: center;text-indent: 25px;">调压箱底腿连接</h3>
               <ObsImageUpload
                 :class=" status == 'read-only' ? 'obsImageUploads' : '' "
@@ -787,7 +787,7 @@
                 :disabled="status == 'read-only' "
               ></ObsImageUpload>
             </div>
-            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'">
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='调压柜安装'||(enginClassification != null && enginClassification.includes('调压柜'))">
               <h3 style="width: 95px;font-weight: 600;text-align: center;text-indent: 25px;">调压箱护栏及地面硬化(远景)</h3>
               <ObsImageUpload
                 :class=" status == 'read-only' ? 'obsImageUploads' : '' "
@@ -1064,6 +1064,7 @@ export default {
             this.checkingInfo.engInfoId = this.currentEnginId
             this.checkingInfo.delInfoIdList=this.delinfoidList
             this.checkingInfo.infoIdList= this.infoIdList
+            console.log('checkWorking',this.checkingInfo)
             this.$emit('checkWorking',this.checkingInfo)
             this.checkList=[]
           } catch (error) {

+ 41 - 14
src/views/zdsz/engineeringIndustry/index.vue

@@ -93,6 +93,14 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
+            @click="viewSource(scope.row,'check')"
+            v-hasPermi="['zdsz:engineeringIndustry:edit']"
+          >审核
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['zdsz:engineeringIndustry:edit']"
           >修改
@@ -105,13 +113,13 @@
             @click="updateviewSource(scope.row)"
           >修改施工信息
           </el-button>
-<!--          <el-button type="text"-->
-<!--                     icon="el-icon-edit"-->
-<!--                     size="mini"-->
-<!--                     v-hasPermi="['zdsz:engineeringIndustry:add']"-->
-<!--                     @click="addzEngineeringMaterBo(scope.row)"-->
-<!--          >添加用料-->
-<!--          </el-button>-->
+          <el-button type="text"
+                     icon="el-icon-edit"
+                     size="mini"
+                     v-hasPermi="['zdsz:engineeringIndustry:add']"
+                     @click="addzEngineeringMaterBo(scope.row)"
+          >添加用料
+          </el-button>
           <el-button
             size="mini"
             type="text"
@@ -315,6 +323,7 @@
       ref="ConstructionDetails"
       :status="status"
       :currentCollapses="currentCollapses"
+      @checkWorking="checkWorking"
       @updateNodeOption="updateNodeOption"
       :enginType="this.$route.query.type == '1' ? '工业工程' : '市政工程'"
     />
@@ -327,13 +336,13 @@ import {
   EditEngineeEngineeIndustry,
   getEngineeIndustryList,
   putEngineeEngineeIndustry,
-  QueryEngineeIndustry, UpdateEngineeIndustry
+  QueryEngineeIndustry, QueryEngineeIndustrys, UpdateEngineeIndustry
 } from '@/api/zdsz/engineeringIndustry'
 import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
 import {validPhoneMobile} from '@/api/rules'
 import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
-import {getEnginMaterialQualityList} from '@/api/zdsz/enginee'
+import {getEnginMaterialQualityList, insertReview} from '@/api/zdsz/enginee'
 import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
 
 export default {
@@ -674,9 +683,27 @@ export default {
         type: this.form.type
       }, 'add', data)
     },
-    // #003 历史施工
-    viewSource(e) {
-      console.log('历史施工', e)
+    // 节点单项审核
+    checkWorking(checkingInfo) {
+      debugger
+      console.log("// 节点单项审核",checkingInfo);
+      let params = checkingInfo
+      params.createTime = checkingInfo.infoIdList[0].createTime
+      params.engInfoId = this.currentId
+      insertReview(params).then(res => {
+        if (res.code == 200) {
+          this.$message({
+            message: '审核成功',
+            type: 'success'
+          });
+          this.$refs.ConstructionDetails.dialogVisible = false
+          this.getList()
+        }
+      })
+    },
+    // 历史查询
+    viewSource(e, type = null) {
+      console.log('历史查询', e)
       this.currentId = e.id
       let val = e.enginType + "_" + e.enginClassification
       val = 'municipal_engineering_node'
@@ -695,7 +722,7 @@ export default {
             value: "历史数据",
             label: "历史数据"
           }
-        ], this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
+        ], this.form.type,type,null,null,e.enginClassification,null,this.form.type === '1' ? "工业工程" : "市政工程")
         this.status = 'read-only'
       })
       // this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
@@ -731,7 +758,7 @@ export default {
       if(!e)return
       console.log('todo: 获取数据', e)
       // todo: 获取数据
-      QueryEngineeIndustry({
+      QueryEngineeIndustrys({
         id: this.currentId,
         type: e
       }).then(res => {