Browse Source

7.11报表和重置

bulusiLuo 9 months ago
parent
commit
a2040d7559

+ 2 - 0
src/router/_import.js

@@ -46,6 +46,8 @@ const map = {
   acceptedLedger: () => import('@/views/zhpt/statisticalReport/acceptedLedger/index.vue'),
   // 工程完工台账
   proCompletionLedger: () => import('@/views/zhpt/statisticalReport/proCompletionLedger/index.vue'),
+  // 户内改造工程台账
+  hoodReport: () => import('@/views/zhpt/statisticalReport/hoodReport/index.vue'),
   // 待办中心
   toDoCenter: () => import('@/views/zhpt/toDocenterOut/toDoCenter/addToDocenter/index.vue'),
 

+ 21 - 47
src/views/currentSystem/authorityManagement/userRights/new.vue

@@ -11,68 +11,38 @@
       <el-checkbox v-model="form.isAdmin" style="margin-top: 20px">是否管理员</el-checkbox>
     </el-row>
     <el-row style="margin-top: 10px; padding-left: 10px">
-      <el-button type="primary" size="small" @click="searchData"
-        >查询<i v-if="loading" class="el-icon-loading"
-      /></el-button>
+      <el-button type="primary" size="small" @click="searchData">查询<i v-if="loading"
+          class="el-icon-loading" /></el-button>
       <el-button type="primary" size="small" @click="addData">新增</el-button>
       <el-button type="primary" size="small" :disabled="selectedData.length !== 1" @click="updateData">修改</el-button>
       <el-button type="primary" size="small" :disabled="selectedData.length === 0" @click="deleteData">删除</el-button>
 
-      <el-button type="primary" size="small" :disabled="selectedData.length !== 1" @click="roleBind"
-        >角色绑定</el-button
-      >
+      <el-button type="primary" size="small" :disabled="selectedData.length !== 1" @click="roleBind">角色绑定</el-button>
       <!-- <el-button type="primary" size="small" :disabled="selectedData.length !== 1" @click="review">审核</el-button> -->
 
       <el-button type="primary" size="small" @click="tempDownload">模板下载</el-button>
-      <el-upload
-        action="fakeaction"
-        style="margin: 0 10px; display: inline-block"
-        :http-request="batchImport"
-        :show-file-list="false"
-        accept=".xls, .xlsx"
-      >
+      <el-upload action="fakeaction" style="margin: 0 10px; display: inline-block" :http-request="batchImport"
+        :show-file-list="false" accept=".xls, .xlsx">
         <el-button size="small" type="primary">批量导入</el-button>
       </el-upload>
       <el-button type="primary" size="small" @click="exportFile">导出</el-button>
 
-      <el-button type="primary" size="small" :disabled="selectedData.length === 0" @click="resetPassword"
-        >重置密码</el-button
-      >
-      <el-button
-        type="primary"
-        size="small"
-        :disabled="!(selectedData.length === 1 && selectedData[0].active !== '启用')"
-        @click="setAbled"
-        >启用</el-button
-      >
-      <el-button
-        type="primary"
-        size="small"
-        :disabled="!(selectedData.length === 1 && selectedData[0].active !== '禁用')"
-        @click="setDisabled"
-        >禁用</el-button
-      >
-      <el-button
-        type="primary"
-        size="small"
-        :disabled="!(selectedData.length === 1 && selectedData[0].lockFlag !== '正常')"
-        @click="unlock"
-        >解锁</el-button
-      >
+      <el-button type="primary" size="small" :disabled="selectedData.length === 0"
+        @click="resetPassword">重置密码</el-button>
+      <el-button type="primary" size="small" :disabled="!(selectedData.length === 1 && selectedData[0].active !== '启用')"
+        @click="setAbled">启用</el-button>
+      <el-button type="primary" size="small" :disabled="!(selectedData.length === 1 && selectedData[0].active !== '禁用')"
+        @click="setDisabled">禁用</el-button>
+      <el-button type="primary" size="small"
+        :disabled="!(selectedData.length === 1 && selectedData[0].lockFlag !== '正常')" @click="unlock">解锁</el-button>
     </el-row>
     <div :style="'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'">
       <tableCom ref="tableCom" v-model="tableInfo" :config="tableStaticConfig"> </tableCom>
     </div>
     <!-- 增,改用户信息 -->
     <el-dialog :title="`${status}用户`" :visible.sync="userDialogVisible" width="850px">
-      <MergeUser
-        v-if="userDialogVisible"
-        ref="ruleForm"
-        :data="editData"
-        :comps="comps"
-        @sucSubmit="sucSubmit"
-        @closeLoad="closeLoad"
-      />
+      <MergeUser v-if="userDialogVisible" ref="ruleForm" :data="editData" :comps="comps" @sucSubmit="sucSubmit"
+        @closeLoad="closeLoad" />
       <div slot="footer" right class="dialog-footer">
         <el-button size="small" @click="userDialogVisible = false">取消</el-button>
         <el-button type="primary" size="small" @click="summitUser" :loading="btnLoad">确定</el-button>
@@ -569,7 +539,7 @@ export default {
       let userIds = this.selectedData.map((i) => i.id).join(',')
       resetPassword({ userIds }).then((res) => {
         if (res.code == 200) {
-          this.$message.success(res.data)
+          this.$message.success('重置密码成功,初始密码:Zmgc@2024')
           this.updateTable()
         } else this.$message.error('重置密码失败')
       })
@@ -654,14 +624,18 @@ export default {
   width: 100%;
   height: 88vh;
   padding: 8px 8px 0px 8px;
+
   .search-opt {
     padding-left: 10px;
-    & > * {
+
+    &>* {
       margin-top: 10px;
     }
+
     div {
       float: left;
     }
+
     .el-button {
       position: relative;
       float: left;

+ 353 - 0
src/views/zhpt/statisticalReport/hoodReport/index.vue

@@ -0,0 +1,353 @@
+<template>
+  <div class="pageContentDiv" style="width: 100%; height: 88vh; padding: 8px 8px 0px 8px">
+    <el-row class="searchDiv" ref="searchDiv">
+      <searchCom :inConfig="searchComConfig" v-model="searchCom"></searchCom>
+      <el-button type="primary" size="small" @click="searchData">查询</el-button>
+      <el-button type="primary" size="small" @click="searchData1">导出</el-button>
+      <addFlow v-model="flowShow2" :sureFlowAction="sureFlowAction"></addFlow>
+    </el-row>
+    <div :style="'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'">
+      <el-table :data="tableData" style="width: 100%;text-align: center;" stripe>
+        <el-table-column label="序号" type="index" width="50">
+        </el-table-column>
+        <el-table-column prop="name" label="工程名称" width="180" align="center">
+        </el-table-column>
+        <el-table-column prop="name" label="工程类型" width="180" align="center">
+        </el-table-column>
+        <el-table-column prop="name" label="申请安装地址" width="180" align="center">
+        </el-table-column>
+        <el-table-column prop="name" label="联系电话" width="180" align="center">
+        </el-table-column>
+        <el-table-column label="工程登记" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="任务分配" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="现场勘察及预算" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="用户缴费" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="合同总价" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="工程派工" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="施工班组和人员" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="施工人员" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="综合验收" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="工程结算" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+        <el-table-column label="结算办理" align="center">
+          <el-table-column prop="name" label="操作人" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="操作时间" width="120" align="center">
+          </el-table-column>
+          <el-table-column prop="name" label="应缴金额" width="120" align="center">
+          </el-table-column>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import searchCom from '@/components/projectCom/searchCom2/index.vue'
+import timeSelect from '@/components/projectCom/timeSelect/index.vue'
+import tableCom from '@/components/projectCom/tableUn/index.vue'
+import commonMe from '@/utils/common.js'
+import commonFlow from '@/utils/commonFlow.js'
+import { getDispatchCount, deleteFlow, dispatchCountExport } from '@/api/flowInfo'
+import inputForm from '@/components/projectCom/inputForm/index.vue'
+import addFlow from '@/views/zhpt/projectManager/newInstall/addFlow/index.vue'
+export default {
+  name: 'addProject',
+  components: {
+    timeSelect,
+    // selectList,
+    tableCom,
+    searchCom,
+    inputForm,
+    addFlow
+  },
+  props: { data: Object },
+  data() {
+    return {
+      searchComConfig: {
+        showTime: true,
+        // showDataConfig: true,
+        // showState: true,
+        showUserType: true,
+        timeLabel: '发起时间'
+      },
+      size: 30,
+      current: 1,
+      sureFlowAction: null, //立即触发登记事件
+      pageShow: false,
+      processId: '',
+      rowHeight: 0, //查询栏的高度
+      config: {
+        mainFlow: 'register', //注册流程
+        subFlow: 'addProject', //当前是登记环节
+        isEdit: false, //操作还是编辑
+        data: null //操作行
+      },
+      title: '',
+      inputConfig: {
+        //输入的相关配置
+        data: [
+          {
+            group: [
+              {
+                label: '登记类型', //显示标签
+                required: true, //是否必填,默认不必填
+                field: 'processId', //存储字段
+                type: 'select', //类型,不写入此参数则默认是text
+                label: '登记类型', //显示标签
+                config: {
+                  //select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
+                  multiple: false, //是否多选
+                  data: [], //下拉数据
+                  field: {
+                    id: 'id', //id代表的字段
+                    label: 'processName' //label的字段
+                  }
+                }
+              }
+            ]
+          }
+        ]
+      },
+      //查询组件的条件接收
+      searchCom: {},
+      currentSearch: {},
+      //查询条件(除开翻页以外的其它查询条件)
+      search: {},
+      flowShow: false, //输入页面显示控制
+      flowShow2: false, //登记页面的显示控制
+      tableInfo: {}, //table相关的一些信息,如当前选择的行数,当前双击的信息等
+
+    }
+  },
+  mounted: function () {
+    this.getTableHeight()
+  },
+  created() {
+    this.config.subflowName = this.$options.name
+    this.sureFlowAction = this.$store.state.routeSetting.registerShow && true
+    this.$store.dispatch('routeSetting/registerShow', false)
+  },
+  destroyed() { },
+  watch: {
+    flowShow() {
+      if (!this.flowShow) {
+        this.searchData()
+      }
+    },
+    flowShow2() {
+      if (!this.flowShow2) {
+        this.searchData()
+      }
+    }
+  },
+  methods: {
+    //查询按钮
+    searchData() {
+      this.$refs.tableCom.getTableDataByOne()
+    },
+
+    searchData1() {
+      const searchInfo = commonMe.notJsonCopy(Object.assign(this.searchCom, this.search))
+      const searchData = {
+        size: this.size,
+        current: this.current,
+        ...searchInfo
+      }
+      let type = 1
+      dispatchCountExport(searchData).then((res) => {
+        let fileName = '工程分派台账.xlsx'
+        const url = window.URL.createObjectURL(new Blob([res], { type }))
+        const link = document.createElement('a')
+        link.href = url
+        link.setAttribute('download', `${fileName}`)
+        document.body.appendChild(link)
+        link.click()
+        window.URL.revokeObjectURL(url) // 释放内存
+      })
+    },
+
+    /**
+     * table翻页时触发,同时整合查询条件
+     * @param pageInfo 翻页的数据
+     */
+    tableChage(pageInfo) {
+      const searchInfo = commonMe.notJsonCopy(Object.assign(this.searchCom, this.search))
+      //   searchInfo.label = this.$route.name
+      this.size = pageInfo.size
+      // this.current = pageInfo.current
+      const searchData = {
+        size: 10000,
+        current: 1,
+        ...searchInfo
+      }
+      // searchData.dto = {
+      //   id: 4,
+      //   map: searchInfo
+      // }
+      return this.getData(searchData)
+    },
+
+    /**
+     * 处理查询获取的数据,然后返回给table进行渲染
+     * searchData 查询条件
+     */
+    getData(searchData) {
+      this.currentSearch = commonMe.shallowCopy(this.searchCom)
+      return new Promise((resolve, reject) => {
+        getDispatchCount(searchData)
+          .then((res) => {
+            let list = JSON.parse(JSON.stringify(res.data.records))
+            list.pop()
+            // console.log('pop', list)
+            resolve({
+              records: list || [],
+              total: res.data.total || 0
+            })
+          })
+          .catch((res) => {
+            reject(res)
+          })
+      })
+    },
+
+    /**
+     * 流程删除
+     */
+    deleteFlow(e) {
+      let data = e
+      if (e && !(data instanceof Array)) {
+        data = [e]
+      }
+      this.$confirm('此操作将永久删除' + data.length + '条流程类型' + ', 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          const params = {
+            id: data
+              .map((e) => {
+                return e.processId
+              })
+              .join(',')
+          }
+          deleteFlow(params).then((res) => {
+            if (res.code == 200) {
+              this.searchData()
+              this.$message({
+                type: 'success',
+                message: '删除成功'
+              })
+            }
+          })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          })
+        })
+    },
+
+    /**
+     * 查看详情
+     */
+    lookInfo(data) {
+      this.title = '工程信息详情'
+      this.config.isEdit = false
+      this.config.data = data
+      this.flowShow = true
+    },
+
+    /**
+     * 处理
+     */
+    handle(data) {
+      this.title = '工程信息处理'
+      this.config.isEdit = true
+      this.config.data = data
+      this.flowShow = true
+    },
+
+    /**
+     * 选择类型
+     */
+    selectChange() {
+      this.pageShow = true
+    },
+
+    /**
+     * 登记按钮
+     */
+    addData() {
+      this.pageShow = false
+      this.title = '工程信息登记'
+      this.config.isEdit = true
+      this.config.data = null
+      this.config.processId = this.processId
+      this.flowShow = true
+    },
+
+    /**
+     * 计算table的高度
+     */
+    getTableHeight() {
+      this.rowHeight = this.$refs.searchDiv.$el.clientHeight
+    }
+  }
+}
+</script>
+<style lang='scss' scoped>
+.pageContentDiv {
+  .searchDiv>* {
+    margin-top: 10px;
+  }
+
+  .el-button {
+    position: relative;
+    float: left;
+  }
+}
+</style>