hanfucheng 9 bulan lalu
induk
melakukan
b8053de7fd

+ 4 - 3
data-ui/src/api/data/housingconstruction/steelcylinderLog.js

@@ -10,10 +10,11 @@ export function listSteelcylinderLog(query) {
 }
 
 // 查询钢瓶日志详细
-export function getsteelcylinderLog(id) {
+export function getAttach(query) {
   return request({
-    url: '/center-data/steelcylinderLog/' + id,
-    method: 'get'
+    url: '/center-data/housingView/getAttach',
+    method: 'get',
+    params: query
   })
 }
 

+ 9 - 0
data-ui/src/views/data/housingconstruction/realnameuser/index.vue

@@ -10,6 +10,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="商户姓名" prop="userName">
+        <el-input
+          v-model="queryParams.userName"
+          placeholder="请输入商户姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="用户类别" prop="enterpriseUserType">
         <el-select v-model="queryParams.enterpriseUserType" placeholder="请选择用户类别" clearable size="small">
           <el-option

+ 1 - 1
data-ui/src/views/data/housingconstruction/steelcylinder/index.vue

@@ -12,7 +12,7 @@
         />
       </el-form-item>
       <el-form-item label="气瓶状态" prop="state">
-        <el-select v-model="queryParams.state" placeholder="请选择气瓶状态" filterable>
+        <el-select v-model="queryParams.state" clearable placeholder="请选择气瓶状态" filterable>
           <el-option
             v-for="dict in dict.type.steelcylinder_state"
             :key="dict.value"

+ 291 - 8
data-ui/src/views/data/housingconstruction/steelcylinderLog/index.vue

@@ -1,6 +1,55 @@
 <template>
   <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="钢瓶名称" prop="steelcylinderName">
+        <el-input
+          v-model="queryParams.steelcylinderName"
+          placeholder="请输入钢瓶名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="企业名称" prop="enterpriseName">
+        <el-input
+          v-model="queryParams.enterpriseName"
+          placeholder="请输入企业名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="配送时间" prop="deliveryTime">
+        <el-date-picker clearable
+                        v-model="queryParams.deliveryTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择配送时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="签收时间" prop="signTime">
+        <el-date-picker clearable
+                        v-model="queryParams.signTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择签收时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="入户用户" prop="joinHouseName">
+        <el-input
+          v-model="queryParams.joinHouseName"
+          placeholder="请输入入户用户"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
 
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -33,8 +82,126 @@
       <el-table-column label="入户用户" align="center" prop="joinHouseName"/>
       <el-table-column label="回收所在用户" align="center" prop="recyclingName"/>
       <el-table-column label="回收时间" align="center" prop="recyclingTime"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="getDetails(scope.row)"
+            v-hasPermi="['data:steelcylinder:operate']"
+          >详情
+          </el-button>
+        </template>
+      </el-table-column>
     </el-table>
 
+    <el-dialog :title="title" :visible.sync="open" width="1000px" class="form-style">
+      <el-form ref="form" :model="form" :rules="rules" label-width="164px">
+        检查
+        <el-row :gutter="20">
+          <el-form-item label="图片" prop="picture">
+            <template v-if="picture!=''" v-for="(imageUrl, imgIndex) in this.picture.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        入户
+        <el-row :gutter="20">
+          <el-form-item label="1.安检人员" prop="workCard">
+            <template v-if="workCard!=''" v-for="(imageUrl, imgIndex) in this.workCard.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="2.是否发现隐患" prop="pitfall">
+            <template v-if="pitfall!=''" v-for="(imageUrl, imgIndex) in this.pitfall.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="3.隐患或环境详情" prop="pitfallDetails">
+            <template v-if="pitfallDetails!=''" v-for="(imageUrl, imgIndex) in this.pitfallDetails.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="4.信息检查" prop="information">
+            <template v-if="information!=''" v-for="(imageUrl, imgIndex) in this.information.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="5.钢瓶检查" prop="steelCylinder">
+            <template v-if="steelCylinder!=''" v-for="(imageUrl, imgIndex) in this.steelCylinder.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="6.连接管检查" prop="tailpiece">
+            <template v-if="tailpiece!=''" v-for="(imageUrl, imgIndex) in this.tailpiece.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="7.器具检查" prop="instrument">
+            <template v-if="instrument!=''" v-for="(imageUrl, imgIndex) in this.instrument.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="8.阀门检査" prop="valve">
+            <template v-if="valve!=''" v-for="(imageUrl, imgIndex) in this.valve.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="9.可燃气体报警装置检査" prop="warningDevice">
+            <template v-if="warningDevice!=''" v-for="(imageUrl, imgIndex) in this.warningDevice.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+        <el-row :gutter="20">
+          <el-form-item label="10.环境检查" prop="environment">
+            <template v-if="environment!=''" v-for="(imageUrl, imgIndex) in this.environment.split(',')">
+              <el-image :src="imageUrl" :key="imgIndex" style="width:8rem; height: 8rem; margin:2px"
+                        :preview-src-list="[imageUrl]">
+              </el-image>
+            </template>
+          </el-form-item>
+        </el-row>
+      </el-form>
+    </el-dialog>
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -47,16 +214,31 @@
 
 <script>
 import {
-   listSteelcylinderLog
+  listSteelcylinderLog,
+  getAttach
 } from "@/api/data/housingconstruction/steelcylinderLog";
 import {format_date} from "@/views/data/common/dateExport";
+import DataImageUpload from "@/components/ImageUpload/dataUpload.vue";
 
 
 export default {
   name: "SteelcylinderLog",
+  components: {DataImageUpload},
   data() {
     return {
-      listSteelcylinderLog:[],
+      picture: '',
+      workCard: '',
+      pitfall: '',
+      pitfallDetails: '',
+      information: '',
+      steelCylinder: '',
+      tailpiece: '',
+      instrument: '',
+      valve: '',
+      warningDevice: '',
+      environment: '',
+
+      listSteelcylinderLog: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -73,12 +255,16 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
-      steelcylinderId : null,
+      steelcylinderId: null,
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        steelcylinderName: null
+        steelcylinderName: null,
+        enterpriseName: null,
+        deliveryTime: null,
+        signTime: null,
+        joinHouseName: null
       },
       // 表单参数
       form: {},
@@ -101,15 +287,112 @@ export default {
         this.loading = false;
       });
     },
+    getDetails(row) {
+      this.picture = ''
+      this.workCard = ''
+      this.pitfall = ''
+      this.pitfallDetails = ''
+      this.information = ''
+      this.steelCylinder = ''
+      this.tailpiece = ''
+      this.instrument = ''
+      this.valve = ''
+      this.warningDevice = ''
+      this.environment = ''
+      const id = row.id || this.ids
+      getAttach({busId: id}).then(response => {
+        const list = response.data;
+        list.forEach((element, index, array) => {
+          switch (element.dictType) {
+            case "picture":
+              if (this.picture === '') {
+                this.picture = element.attachPath;
+              } else {
+                this.picture += ',' + element.attachPath;
+              }
+              break;
+            case "workCard":
+              if (this.workCard === '') {
+                this.workCard = element.attachPath;
+              } else {
+                this.workCard += ',' + element.attachPath;
+              }
+              break;
+            case "pitfall":
+              if (this.pitfall === '') {
+                this.pitfall = element.attachPath;
+              } else {
+                this.pitfall += ',' + element.attachPath;
+              }
+              break;
+            case "pitfallDetails":
+              if (this.pitfallDetails === '') {
+                this.pitfallDetails = element.attachPath;
+              } else {
+                this.pitfallDetails += ',' + element.attachPath;
+              }
+              break;
+            case "information":
+              if (this.information === '') {
+                this.information = element.attachPath;
+              } else {
+                this.information += ',' + element.attachPath;
+              }
+              break;
+            case "steelCylinder":
+              if (this.steelCylinder === '') {
+                this.steelCylinder = element.attachPath;
+              } else {
+                this.steelCylinder += ',' + element.attachPath;
+              }
+              break;
+            case "tailpiece":
+              if (this.tailpiece === '') {
+                this.tailpiece = element.attachPath;
+              } else {
+                this.tailpiece += ',' + element.attachPath;
+              }
+              break;
+            case "instrument":
+              if (this.instrument === '') {
+                this.instrument = element.attachPath;
+              } else {
+                this.instrument += ',' + element.attachPath;
+              }
+              break;
+            case "valve":
+              if (this.valve === '') {
+                this.valve = element.attachPath;
+              } else {
+                this.valve += ',' + element.attachPath;
+              }
+              break;
+            case "warningDevice":
+              if (this.warningDevice === '') {
+                this.warningDevice = element.attachPath;
+              } else {
+                this.warningDevice += ',' + element.attachPath;
+              }
+              break;
+            case "environment":
+              if (this.environment === '') {
+                this.environment = element.attachPath;
+              } else {
+                this.environment += ',' + element.attachPath;
+              }
+              break;
+          }
+        });
+        console.log(this.picture)
+        this.open = true;
+        this.title = "详情";
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
       this.reset();
     },
-    cancel1() {
-      this.open1 = false;
-      this.reset();
-    },
     // 表单重置
     reset() {
       this.form = {

+ 4 - 0
src/main/resources/mapper/housingconstruction/CenterdataTHousingconstructionSteelcylinderLogMapper.xml

@@ -43,6 +43,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="steelcylinderId != null  and steelcylinderId != ''"> and a.steelcylinder_id = #{steelcylinderId}</if>
             <if test="steelcylinderName != null  and steelcylinderName != ''"> and a.steelcylinder_name like concat('%', #{steelcylinderName}, '%')</if>
+            <if test="enterpriseName != null  and enterpriseName != ''"> and b.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
+            <if test="deliveryTime != null"> and DATE_FORMAT( a.delivery_time, '%Y-%m-%d' ) = DATE_FORMAT( #{deliveryTime}, '%Y-%m-%d' )</if>
+            <if test="signTime != null"> and DATE_FORMAT( a.sign_time, '%Y-%m-%d' ) = DATE_FORMAT( #{signTime}, '%Y-%m-%d' )</if>
+            <if test="joinHouseName != null  and joinHouseName != ''"> and a.join_house_name like concat('%', #{joinHouseName}, '%')</if>
             ${params.dataScope}
         </where>
         order by a.update_time desc

+ 2 - 2
src/main/resources/mapper/housingconstruction/CenterdataTHousingconstructionViewMapper.xml

@@ -265,14 +265,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             IFNULL(c.num,0) gpNum,
             IFNULL(e.num,0) aqNum,
             IFNULL(f.num,0) yxNum,
-            IFNULL(b.storage_capacity,0)  storageCapacity
+            IFNULL(f.storageCapacity,0)  storageCapacity
         FROM
             centerdata_t_housingconstruction_enterprise a
             LEFT JOIN  (select count(id) num, enterprise_id, sum(storage_capacity) storage_capacity from centerdata_t_housingconstruction_storagetank GROUP BY enterprise_id) b ON a.id = b.enterprise_id
             left join (select count(id) num, enterprise_id from centerdata_t_housingconstruction_steelcylinder GROUP BY enterprise_id) c on a.id = c.enterprise_id
             left join  (SELECT count(id) num,dept_id FROM centerdata_t_housingconstruction_storagetank_log
             WHERE create_time = (SELECT MAX(create_time) FROM centerdata_t_housingconstruction_storagetank_log) and security_state ='' GROUP BY dept_id) e on a.id = e.dept_id
-            left join  (select count(id) num,dept_id from centerdata_t_housingconstruction_storagetank_log where run_state = 1 GROUP BY dept_id) f on a.id = f.dept_id
+            left join  (select count(id) num,sum(storage_capacity) storageCapacity,dept_id from centerdata_t_housingconstruction_storagetank_log where run_state = 1 GROUP BY dept_id) f on a.id = f.dept_id
             LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
         <where>
             ${params.dataScope}