Browse Source

水价编码

xubin 1 năm trước cách đây
mục cha
commit
223a28c9a3

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 374 - 366
package-lock.json


+ 1 - 1
package.json

@@ -21,7 +21,7 @@
     "echarts-gl": "^1.1.2",
     "echarts-liquidfill": "^2.0.6",
     "echarts-wordcloud": "^2.1.0",
-    "echarts5": "npm:echarts@^5.2.2",
+    "echarts5": "npm:echarts@^5.4.2",
     "element-ui": "^2.15.7",
     "esri-loader": "^2.16.0",
     "file-saver": "^2.0.5",

+ 3 - 2
src/router/_import.js

@@ -240,7 +240,8 @@ const map = {
 
   //营销收费管理系统(MIS)
   mishome: () => import('@/views/mis/mishome/index'), // Mis营销首页 
-  bmsjgl: () => import('@/views/mis/cwgl/bm_sjgl'), // 水价管理  
+  priceList: () => import('@/views/mis/financialManage/priceManage/priceList'), // 水价管理  
   meterInfo: () => import('@/views/mis/meterManage/meterInfo/meterList'), // 水表档案
-  meterChange: () => import('@/views/mis/meterManage/meterChange/index'), // 用户换表
+  meterChange: () => import('@/views/mis/meterManage/meterChange/index') // 用户换表
+
 }

+ 0 - 903
src/views/mis/cwgl/bm_sjgl.vue

@@ -1,903 +0,0 @@
-<template>
-    <div id="register">
-      <!-- 水价管理 -->
-      <div class="head">
-        <el-row>
-          <!-- 头部查询栏左边 -->
-          <el-col :span="20">
-            <el-row type="flex" :gutter="10">
-                <!--
-              <el-col :span="4">
-                <el-select v-model="query.waterworksId" placeholder="所在水厂" size="small" style="width:100%" clearable @change="queryWarehouseData">
-                  <el-option v-for="(item, index) in waterData" :key="index" :label="item.name" :value="item.id"></el-option>
-                </el-select>
-              </el-col>
-  
-              <el-col :span="4">
-                <el-select v-model="query.storeId" placeholder="存放仓库" size="small" style="width:100%" clearable>
-                  <el-option v-for="(item, index) in warehouseData" :key="index" :label="item.storeName" :value="item.id"></el-option>
-                </el-select>
-              </el-col>
-  
-              <el-col :span="4">
-                <el-select v-model="query.materialTypeId" placeholder="设备类型" size="small" style="width:100%" clearable>
-                  <el-option v-for="(item, index) in materialTypeData" :key="index" :label="item.materialTypeName" :value="item.id"></el-option>
-                </el-select>
-              </el-col>
-  -->
-              <el-col :span="6">
-                <el-input v-model="query.materialInfo" placeholder="水价编码、水价名称、用水类型" size="small" style="width:100%" clearable></el-input>
-              </el-col>
-  
-              <el-col :span="2">
-                <el-button type="primary" size="small" icon="el-icon-search" @click="doQuery">查询</el-button>
-              </el-col>
-            </el-row>
-          </el-col>
-          <!-- 头部查询栏右边 -->
-          <el-col :span="4">
-            <el-row type="flex" class="row-bg" justify="end">
-              <el-button type="primary" size="small" icon="el-icon-plus" @click="add">新 增</el-button>
-              <el-button type="primary" size="small" icon="el-icon-edit" :disabled="disabledBtn" @click="editor">修 改</el-button>
-              <el-button type="danger" size="small" icon="el-icon-delete" :disabled="disabledBtn2" @click="deleteByIds">删 除</el-button>
-            </el-row>
-          </el-col>
-        </el-row>
-      </div>
-  
-      <!-- 表格 -->
-      <div class="table_width">
-        <table-item 
-        :table-data="list" 
-        :column="column" 
-        :pagination="true" 
-        :pagesize="pagination.size" 
-        :currentpage="pagination.current" 
-        :tableheight="Number(tableheight)" 
-        :border="true" 
-        :multiple="true" :stripe="true" :total="pagination.total"
-        :fixed="false" 
-        :isdelete="true" 
-        forId
-        @handleCurrentChange="handleCurrentChange" 
-        @handleSizeChange="handleSizeChange"
-        @handleSelectionChange="handleSelectionChange"
-        @detail="detail" 
-        v-loading="loading"/>
-      </div>
-  
-      <!-- 水价管理表单 -->
-      <el-dialog v-if="dialogVisible" v-dialogDrag top="20vh" :title="dialogVisibleTitle" :visible.sync="dialogVisible" width="1000px" class="dialog">
-        <div  style="width: 100%; height: auto">
-  
-          <tf-title>基本信息</tf-title>
-  
-          <el-form :model="form" label-width="80px" size="small" ref="form" :rules="formRules">
-            <!--
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="设备名称" prop="deviceName">
-                  <el-input v-model="form.deviceName" style="width:100%" placeholder="点击选择设备名称" :disabled="editState" @focus="selectClient"></el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
-  -->
-            <el-row>
-              <el-col :span="8">
-                <el-form-item label="所在水厂" prop="waterworksName">
-                  <el-input v-model="form.waterworksName" style="width:100%" placeholder="水厂名称" :disabled="nameEditState" ></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="所属仓库" prop="wareHouse">
-                  <el-input v-model="form.storeName" style="width:100%" placeholder="仓库名称" :disabled="nameEditState" ></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="设备类型" prop="materialTypeName">
-                  <el-input v-model="form.materialTypeName" style="width:100%" placeholder="设备类型" :disabled="nameEditState"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="规格型号" prop="deviceSpecsModel">
-                  <el-input v-model="form.deviceSpecsModel" style="width:100%" placeholder="规格型号" :disabled="nameEditState"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="单位" prop="deviceUnitName">
-                  <el-input v-model="form.deviceUnitName" style="width:100%" placeholder="单位"
-                    :disabled="nameEditState"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="入库日期" prop="instockTime">
-                  <el-input v-model="form.instockTime" style="width:100%" placeholder="入库日期"
-                    :disabled="nameEditState"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="入库数量" prop="instockNum">
-                  <el-input v-model="form.instockNum" style="width:100%" placeholder="入库数量"
-                    :disabled="nameEditState"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="采购单价" prop="unitPrice">
-                  <el-input v-model="form.unitPrice" style="width:100%" placeholder="采购单价" :disabled="nameEditState"><i slot="suffix"
-                      style="font-style: normal; margin-right: 10px; line-height: 36px">元</i></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="采购总价" prop="totalPrice">
-                  <el-input v-model="form.totalPrice" style="width:100%" placeholder="采购总价" :disabled="nameEditState"><i slot="suffix"
-                      style="font-style: normal; margin-right: 10px; line-height: 36px">元</i></el-input>
-                </el-form-item>
-              </el-col>
-            <tf-title>折旧信息</tf-title>
-            <el-col :span="8">
-              <el-form-item label="折旧方式" prop="depreciateType">
-                <el-select v-model="form.depreciateType" placeholder="请选择折旧方式" size="small" clearable :disabled="editState" style="width: 100%;" @change="choiceType">
-                  <el-option v-for="(item,index) in equipmentDepreciateTypes" :key="item.index" :label="item.cname" :value="item.ccode">
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="折旧数值" prop="depreciateValue" :rules="valueRequired">
-                <el-input v-model="form.depreciateValue" style="width:100%" placeholder="折旧数值" :disabled="valueEditState"
-                  type="number">
-                  <i slot="suffix" style="font-style: normal; margin-right: 10px; line-height: 36px" v-if="valueShow1">元</i>
-                  <i slot="suffix" style="font-style: normal; margin-right: 10px; line-height: 36px" v-if="valueShow2">%</i></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="入库月数" prop="inStockMonth">
-                <el-input v-model="form.inStockMonth" style="width:100%" placeholder="入库月数"
-                  :disabled="nameEditState"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="当前价值" prop="currentPrice">
-                <el-input v-model="form.currentPrice" style="width:100%" placeholder="当前价值" :disabled="nameEditState"><i
-                    slot="suffix" style="font-style: normal; margin-right: 10px; line-height: 36px">元</i></el-input>
-              </el-form-item>
-            </el-col>
-            <!-- <el-col :span="8">
-              <el-form-item label="折旧价值" prop="depreciatePrice">
-                <el-input v-model="form.depreciatePrice" style="width:100%" placeholder="折旧价值"
-                  :disabled="nameEditState"></el-input>
-              </el-form-item>
-            </el-col> -->
-            </el-row>
-          </el-form>
-  
-        </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button type="primary" size="small" class="throttle" @click="submit()" v-if="isShow">确 定</el-button>
-          <el-button type="primary" size="small" @click="dialogVisible=false">关 闭</el-button>
-        </span>
-      </el-dialog>
-  
-          <!-- 选择设备表单 -->
-        <el-dialog v-if="dialogVisibleEquipment" v-dialogDrag top="15vh" title="选择设备" :visible.sync="dialogVisibleEquipment" width="1000px" class="dialog">
-        <div  style="width: 100%; height: auto">
-  
-          <!-- 搜索框 -->
-          <el-row>
-          <!-- 头部查询栏左边 -->
-          <el-col :span="24">
-            <el-row type="flex" :gutter="10">
-              <el-col :span="4">
-                <el-select v-model="queryDevice.waterworksId" placeholder="所在水厂" size="small" style="width:100%" clearable @change="queryWarehouseData">
-                  <el-option v-for="(item, index) in waterData" :key="index" :label="item.name" :value="item.id"></el-option>
-                </el-select>
-              </el-col>
-  
-              <el-col :span="4">
-                <el-select v-model="queryDevice.storeId" placeholder="存放仓库" size="small" style="width:100%" clearable>
-                  <el-option v-for="(item, index) in warehouseData" :key="index" :label="item.storeName" :value="item.id"></el-option>
-                </el-select>
-              </el-col>
-  
-              <el-col :span="6">
-                <el-input v-model="queryDevice.materialInfo" placeholder="设备类型、名称、规格" size="small" style="width:100%" clearable></el-input>
-              </el-col>
-  
-              <el-col :span="6">
-                <!-- <el-date-picker v-model="queryDevice.times" size="small" type="daterange" unlink-panels range-separator="至"
-                              start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"  style="width:100%" clearable/> -->
-                <el-date-picker v-model="queryDevice.times" type="daterange" size="small" style="width:100%" clearable range-separator="至"
-                  start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd 00:00:00"></el-date-picker>
-              </el-col>
-              
-              <el-col :span="2">
-                <el-button type="primary" size="small" icon="el-icon-search" @click="queryDepreciateData">查询</el-button>
-              </el-col>
-            </el-row>
-          </el-col>
-        </el-row>
-  
-          <!-- 物资入库中的设备 -->
-          <el-table
-        ref = "equipmentDepreciateData"
-        highlight-current-row
-        id="siteMonitor" 
-        :total="pageInfo.total"
-        class="mapTable" 
-        :data="equipmentDepreciateData" 
-        border
-        style="margin-top: 5px;">
-          <!-- 列 -->
-          <el-table-column type="index" align="center" width="50" label="序号" />
-      
-         <!----> <el-table-column prop="waterworksName" 
-          align="center" 
-          label="所在水厂" 
-          show-overflow-tooltip />
-      
-          <el-table-column 
-          prop="storeName" 
-          align="center" 
-          label="存放仓库" 
-          show-overflow-tooltip />
-  
-          <el-table-column 
-          prop="materialTypeName" 
-          align="center" 
-          label="设备类型" 
-          show-overflow-tooltip />
-  
-          <el-table-column 
-          prop="deviceName" 
-          align="center" 
-          label="设备名称" 
-          show-overflow-tooltip />
-  
-          <el-table-column 
-          prop="deviceSpecsModel" 
-          align="center" 
-          label="规格型号" 
-          show-overflow-tooltip />
-  
-          <el-table-column 
-          prop="deviceUnitName" 
-          align="center" 
-          label="单位" 
-          show-overflow-tooltip />
-      
-          <el-table-column 
-          prop="instockTime" 
-          align="center" 
-          label="入库日期" 
-          show-overflow-tooltip />
-      
-          <el-table-column 
-          prop="unitPrice" 
-          align="center" 
-          label="采购单价" 
-          show-overflow-tooltip>
-          </el-table-column>
-  
-          <el-table-column 
-          prop="totalPrice" 
-          align="center" 
-          label="采购总价" 
-          show-overflow-tooltip>
-          </el-table-column>
-          
-          <el-table-column align="center" label="选择" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-button type="text" @click="choice(scope.row)">选择</el-button>
-            </template>
-          </el-table-column>
-          
-          </el-table>
-          
-          <el-row style="margin-top: 10px">
-            <el-col :span="24">
-              <div style="float: left;">
-                <el-pagination ref="pagination" small layout="total, sizes, prev, pager, next, jumper" :pager-count="5"
-                  :current-page="pageInfo.current" :page-sizes="[1, 10, 20, 30]" style="margin-top: 4px"
-                  :page-size="pageInfo.size" :total="pageInfo.total" @size-change="handleSizeChange1"
-                  @current-change="handleCurrentChange1" />
-              </div>
-          
-              <!-- <div style="float: right;">
-                <el-button type="primary" size="small" class="throttle" @click="commit()">确 定</el-button>
-                <el-button type="primary" size="small" @click="dialogVisibleEquipment=false">关 闭</el-button>
-              </div> -->
-          
-            </el-col>
-          
-          </el-row>
-          
-  
-          </div>
-          <!-- <span slot="footer" class="dialog-footer" >
-                <el-button type="primary" size="small" class="throttle" @click="commit()">确 定</el-button>
-                <el-button type="primary" size="small" @click="dialogVisibleEquipment=false">关 闭</el-button>
-              </span> -->
-          </el-dialog>
-  
-  
-    </div>
-  </template>
-  
-  <script>
-  import { client } from "@/utils/index";
-  import TableItem from "@/components/Table";
-  
-  import { addEquipmentDepreciation, getEquipmentDepreciationPage, editEquipmentDepreciation, deleteEquipmentDepreciation, getEquipmentDepreciateList } from "@/api/dcApi/inventoryApi";
-  import {getWaterData} from "@/api/dispatch/dispatch";
-  import { getInventoryManagePage } from "@/api/dcApi/inventoryApi";
-  import {getPutstockinfo,getMaterialtypeList} from "@/api/storeApi/stroreApi";
-  // 引入字典查询接口
-  import { getCommonCode } from "@/api/base";
-  
-  export default {
-    components: { TableItem },
-    name:"equipmentDepreciation",
-    data() {
-      return {
-  
-        isShow:true,
-        // 水厂数据
-        waterData : [],
-        // 仓库数据
-        warehouseData : [],
-        // 物资类型数据
-        materialTypeData:[],
-        // 入库数据
-        tableDataIn:[],
-        // 设备数据
-        equipmentDepreciateData: [],
-        // 折旧类型数据
-        equipmentDepreciateTypes: [],
-  
-        pagination: { current: 1, size: 20, total: 0 },
-        pageInfo: { current: 1, size: 10, total: 0 }, // 分页数据
-        dialogVisible: false,
-        // 设备选择
-        dialogVisibleEquipment: false,
-        // 控制折旧数值是否显示
-        valueEditState:false,
-        // 控制折旧数值是否必填
-        valueRequired:[{ required: true, message: "请输入折旧数值", trigger: "blur" }],
-        // 控制折旧方式的不同,折旧价值单位不同的显示
-        valueShow1:false,
-        valueShow2:false,
-        list: [],
-        form: {
-          deviceName:"",
-          depreciateType:"",
-          depreciateValue:"",
-          inStockMonth:"",
-          currentPrice:""
-        },
-        formRules:{
-          deviceName:[
-          { required: true, message: "请选择设备名称", trigger: "change" },
-          ],
-          depreciateType:[
-          { required: true, message: "请选择折旧方式", trigger: "blur" },
-          ],
-        },
-        query: {
-          waterworksId:"",
-          storeId:"",
-          materialTypeId:"",
-          // 水价信息
-          materialInfo: "",
-        },
-  
-        queryDevice: {
-          waterworksId: "",
-          storeId: "",
-          // 物资信息
-          materialInfo: "",
-          // 入库时间
-          times:[],
-        },
-  
-        column: [
-          {
-            label: "公司",
-            type: "index",
-            sortable: true
-          },
-          {
-            label: "水价编码",
-            prop: "CODE"
-          },
-          {
-            label: "水价名称",
-            prop: "NAME",
-          },
-          {
-            label: "用水类型",
-            prop: "USE_WATER_TYPE"
-          },
-          {
-            label: "水价",
-            prop: "PRICE"
-          },
-          {
-            label: "污水费单价",
-            prop: "SEWAGE_FEE_PRICE"
-          },
-          {
-            label: "垃圾费单价",
-            prop: "GARBAGE_FEE_PRICE"
-          },
-          {
-            label: "阶梯计算类型",
-            prop: "TIERED_CAL_TYPE"
-          },
-          {
-            label: "阶梯计算方式",
-            prop: "TIERED_CAL_MODE"
-          },
-          {
-            label: "税率",
-            prop: "TAX_RATE"
-          },
-          {
-            label: "是否启用",
-            prop: "ISDISABLED"
-          },
-          {
-            label: "操作人员",
-            prop: "OCODE"
-          },
-          {
-            label: "创建时间",
-            prop: "CDATE"
-          },
-          {
-            label: "备注",
-            prop: "REMARK"
-          },
-          {
-            slotScoped: 'action',
-            label: '操作',
-            acts: [{ emitWay: 'detail', color: '#0000FF', operation: '详情' }]
-          },
-        ],
-        opType: true,
-        disabledBtn: true,
-        disabledBtn2: true,
-        dispatchs: [],
-        editData:[],
-        
-        multipleSelection: [],
-  
-        // 控制设备折旧表单是否能输入
-        nameEditState:false,
-        editState:false,
-  
-        // 选中的设备数据
-        choiceData:{},
-        //折旧id
-        depreciateId:"",
-        // xuanze
-        multipleSelectionId:"",
-  
-        // 控制表格查询时显示
-        loading:false,
-      };
-    },
-  
-    computed: {
-      // mapHeight() {
-      //   return client().height - 150 - client().height * 0.1 + "px";
-      // },
-      tableheight() {
-        return client().height - 230 ;
-      }
-    },
-  
-    watch: {
-      multipleSelection(value) {
-        this.disabledBtn = this.multipleSelection.length !== 1;
-        this.disabledBtn2 = this.multipleSelection.length == 0;
-      },
-    },
-  
-    created() { },
-  
-    mounted() {
-      this.getExpertPage();
-      this.queryWaterData();
-      this.queryInStoreData();
-      this.queryMaterialType();
-      this.getSelectOptions();
-    },
-  
-    methods: {
-      /**
-  * 获取下拉菜单
-  */
-      async getSelectOptions() {
-        const getCodeList = async (pcid, arrName) => {
-          await getCommonCode({ pCid: pcid }).then(res => {
-            if (res.code != 1 && res.result.length == 0) return
-            this[arrName] = res.result[0].codeList
-          })
-        }
-        // 工程类型 66305
-        await getCodeList('66317', 'equipmentDepreciateTypes');
-      },
-  
-      // 查询水厂数据
-      queryWaterData() {
-        let params = {
-          size: this.pagination.size,
-          current: this.pagination.current
-        };
-        getWaterData(params).then((res) => {
-          // console.log("水厂" + JSON.stringify(res));
-          this.waterData = res.result.records;
-        })
-      },
-  
-      // 查询仓库数据
-      queryWarehouseData(waterworksId) {
-        let params = {
-          size: this.pagination.size,
-          current: this.pagination.current,
-          waterworksId:waterworksId,
-        };
-        getInventoryManagePage(params).then((res) => {
-          // console.log("仓库" + JSON.stringify(res));
-          this.warehouseData = res.result.records;
-        })
-      },
-  
-      // 查询物资类型数据
-      queryMaterialType() {
-        let params = {
-          size: this.pagination.size,
-          current: this.pagination.current
-        };
-        getMaterialtypeList(params).then((res) => {
-          // console.log("物资类型" + JSON.stringify(res));
-          this.materialTypeData = res.result;
-          this.materialTypeData = res.result.filter((item) => {
-            return item.materialCategoryId == 62002;
-          });
-        })
-      },
-  
-      // 查询入库数据
-      queryInStoreData() {
-        let params = {
-          size: this.pageInfo.size,
-          current: this.pageInfo.current
-        };
-        getPutstockinfo(params).then((res) => {
-          // console.log("入库数据" + JSON.stringify(res));
-          this.tableDataIn = res.result.records.map((item) => {
-            item.instockTime = item.instockTime.substr(0,10);
-            return item;
-          });
-          this.pageInfo.total = parseInt(res.result.total);
-        })
-      },
-  
-      queryDepreciateData(){
-        this.queryEquipmentDepreciateData(this.opType);
-      },
-  
-      // 查询设备数据
-      queryEquipmentDepreciateData(isTrue) {
-        let depreciateId = "";
-        if(isTrue) depreciateId = 0;
-        else depreciateId = this.multipleSelectionId;
-        let params = {
-          size: this.pageInfo.size,
-          current: this.pageInfo.current,
-          id:depreciateId,
-        };
-        if (this.queryDevice.waterworksId) params["waterworksId"] = this.queryDevice.waterworksId;
-        if (this.queryDevice.storeId) params["storeId"] = this.queryDevice.storeId;
-        if (this.queryDevice.materialInfo) params["searchValue"] = this.queryDevice.materialInfo;
-        if (this.queryDevice.times && this.queryDevice.times?.length == 2) {
-          params["inStockTimeStart"] = this.queryDevice.times[0];
-          params["inStockTimeEnd"] = this.queryDevice.times[1];
-        };
-  
-        params["deviceType"] = 62002;
-        getEquipmentDepreciateList(params).then((res) => {
-          // console.log("设备数据" + JSON.stringify(res));
-          this.equipmentDepreciateData = res.result.records.map((item) => {
-            item.instockTime = item.instockTime.substr(0,10);
-            return item;
-          });
-          this.pageInfo.total = res.result.total;
-        })
-      },
-  
-      /**
-       * 分页查询
-       */
-      getExpertPage() {
-        let params = JSON.parse(JSON.stringify(this.pagination));
-        if (this.query.waterworksId) params["waterworksId"] = this.query.waterworksId;
-        if (this.query.storeId) params["storeId"] = this.query.storeId;
-        if (this.query.materialTypeId) params["materialTypeId"] = this.query.materialTypeId;
-        if (this.query.materialInfo) params["searchValue"] = this.query.materialInfo;
-        params["deviceType"] = 62002;
-        this.loading = true;
-        getEquipmentDepreciationPage(params).then(res => {
-          if (res.code == 1) {
-            this.list = res.result.records;
-            this.pagination.total = parseInt(res.result.total);
-            this.list = this.list.map((item) => {
-               item['depreciateTypeName'] = this.equipmentDepreciateTypes.find(el => { return el.ccode == item.depreciateType })?.cname || '--'; // 折旧方式
-               return item;
-            });
-            this.list = this.list.map((item) => {
-            item.instockTime = item.instockTime.substr(0,10);
-            return item;
-          });
-          }
-          else{
-            this.$message.error("查询失败!");
-          }
-        })
-        .catch((er) => {
-          this.$message.error("查询失败!");
-        })
-        .finally(() => {
-          this.loading = false;
-        })
-      },
-      doQuery() {
-        // this.pagination.current = 1;
-        this.getExpertPage();
-      },
-      /**
-       * 删除
-       */
-      deleteByIds() {
-        const ids = this.multipleSelection.map(item => { return item.id })
-        this.$confirm('确定删除设备折旧?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deleteEquipmentDepreciation({ ids: ids.join(',') }).then(res => {
-            if (res.code == 1) {
-              this.getExpertPage();
-              this.$message.success("删除设备折旧信息成功");
-              this.dialogVisible = false;
-            }
-          })
-        })
-      },
-      
-      // 新增
-      add() {
-        this.opType = true
-        this.dialogVisibleTitle = "新增水价编码";
-        this.dialogVisible = true;
-        this.editState = false;
-        this.nameEditState = true;
-        this.isShow = true;
-        // 重置表单
-        this.form = this.$options.data().form;
-        this.$nextTick(() => {
-          this.$refs.form.clearValidate()
-        })
-      },
-      // 修改
-      editor() {
-        this.multipleSelectionId = this.multipleSelection[0].id;
-        this.opType = false;
-        this.dialogVisibleTitle = "修改水价编码";
-  
-        this.dialogVisible = true;
-        this.editState = false;
-        this.nameEditState = true;
-        this.isShow = true;
-        this.choiceType(this.multipleSelection[0].depreciateType);
-              // 深拷贝
-              this.form = JSON.parse(JSON.stringify(this.multipleSelection[0]))
-      },
-      /**
-       * 新增
-       */
-      addExpert() {
-        const deviceDepreciate = {
-          instockDetailId : this.form.instockDetailId,
-          depreciateType : this.form.depreciateType,
-          depreciateValue : this.form.depreciateValue,
-  
-        }
-        addEquipmentDepreciation(deviceDepreciate).then(res => {
-          if (res.code == 1) {
-            this.getExpertPage();
-            this.$message.success("新增水价编码信息成功");
-            // 重置
-            this.form = this.$options.data().form
-            this.dialogVisible = false;
-          }
-        });
-      },
-      /**
-       * 修改
-       */
-      putExpert() {
-        // const data = JSON.parse(JSON.stringify(this.form));
-        const deviceDepreciate = {
-          id : this.form.id,
-          instockDetailId : this.form.instockDetailId,
-          depreciateType : this.form.depreciateType,
-          depreciateValue : this.form.depreciateValue,
-        };
-        editEquipmentDepreciation(deviceDepreciate).then(res => {
-          if (res.code == 1) {
-            this.getExpertPage();
-            this.$message.success("修改水价编码信息成功");
-            this.form = this.$options.data().form
-            this.dialogVisible = false;
-          }
-        });
-      },
-      // 选择
-      handleSelectionChange(value) {
-        this.multipleSelection = value
-      },
-      /**
-       * 新增修改提交
-       */
-      submit() {
-        this.$refs.form.validate((valid) => {
-          if (valid) {
-            if (this.opType) this.addExpert() // 新增
-            else this.putExpert() // 修改
-          } else {
-            return false;
-          }
-        });
-      },
-  
-      // 详细
-      detail(val) {
-        // console.log("xiangxi "+JSON.stringify(val));
-        this.isShow = false;
-        val.id ? this.editData = val : this.editData = this.multipleSelection[0];
-        this.dialogVisibleTitle = "设备折旧详情";
-        this.dialogVisible = true;
-        this.nameEditState = true;
-        this.editState = true;
-        this.valueEditState = true;
-  
-  
-        this.choiceType(val.depreciateType);
-        this.form = {...this.multipleSelection[0]};
-        this.form = {...val};
-        this.valueEditState = true;
-      },
-  
-      // 选择设备
-      selectClient(){
-        this.dialogVisibleEquipment = true;
-        this.queryEquipmentDepreciateData(this.opType);
-      },
-  
-      // 选择具体设备
-      choice(row){
-        // console.log("选中的数据"+JSON.stringify(row));
-        this.choiceData = row;
-  
-        this.dialogVisibleEquipment = false;
-        // this.form = {...this.choiceData};
-        this.form.instockDetailId = this.choiceData.instockDetailId;
-        this.form.deviceName = this.choiceData.deviceName;
-        this.form.waterworksName = this.choiceData.waterworksName;
-        this.form.storeName = this.choiceData.storeName;
-        this.form.materialTypeName = this.choiceData.materialTypeName;
-        this.form.deviceSpecsModel = this.choiceData.deviceSpecsModel;
-        this.form.deviceUnitName = this.choiceData.deviceUnitName;
-        this.form.instockTime = this.choiceData.instockTime;
-        this.form.instockNum = this.choiceData.instockNum;
-        this.form.unitPrice = this.choiceData.unitPrice;
-        this.form.totalPrice = this.choiceData.totalPrice;
-        this.form.inStockYear = "";
-      },
-  
-      // 选择折旧方式
-      choiceType(val){
-        // console.log("折旧方式"+JSON.stringify(val));
-        if(val == 1){
-          // 是否能编辑
-          this.valueEditState = true;
-          // 是否能验证
-          this.valueRequired = false;
-          this.form.depreciateValue = 0;
-          this.valueRequired = [{ required: false }];
-        }else{
-          this.valueEditState = false;
-          this.valueRequired = true;
-          this.form.depreciateValue = "";
-          this.valueRequired = [{ required: true, message: "请输入折旧数值", trigger: "blur" }];
-        };
-  
-        if(val == 1 || val == 2 || val == 3){
-          // 根据不同的折旧方式显示不同的单位
-          this.valueShow1 = true;
-          this.valueShow2 = false;
-        }else if(val == 4 || val == 5){
-          this.valueShow1 = false;
-          this.valueShow2 = true;
-        };
-      },
-  
-      handleCurrentChange(current) {
-        this.pagination.current = current
-        this.doQuery()
-      },
-      handleSizeChange(size) {
-        this.pagination.size = size
-        this.doQuery()
-      },
-  
-      handleCurrentChange1(current) {
-        this.pageInfo.current = current
-        this.queryEquipmentDepreciateData(this.opType)
-      },
-      handleSizeChange1(size) {
-        this.pageInfo.size = size
-        this.queryEquipmentDepreciateData(this.opType)
-      },
-    }
-  };
-  </script>
-  
-  <style lang="scss" scoped>
-  #register {
-    padding: 20px 30px;
-    .head {
-      margin-bottom: 10px;
-    }
-    .dialog_style {
-      margin-top: 20px;
-      width: 100%;
-      overflow: hidden;
-      /deep/ .el-table {
-        text-align: center;
-        vertical-align: middle;
-      }
-    }
-    /deep/ .dialog > div > div:nth-child(2) {
-      padding: 10px 20px;
-    }
-    .delete {
-      display: flex;
-      flex-direction: column;
-      justify-content: center;
-      align-items: center;
-      :nth-child(1) {
-        font-size: 50px;
-        color: red;
-        margin-bottom: 10px;
-      }
-      p {
-        font-size: 20px;
-      }
-    }
-  }
-  .flexs {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-  }
-  .inputTitle {
-    display: block;
-    height: 40px;
-    line-height: 40px;
-    text-align-last: justify;
-    font-weight: 700;
-  }
-  </style>

+ 431 - 0
src/views/mis/financialManage/priceManage/priceList.vue

@@ -0,0 +1,431 @@
+<template>
+ <!-- 考核标准管理 -->
+ <div id="wxReport" class="wxReport">
+  <div class="filteroption">
+        <!--查询模块-->
+    <div style="display:flex;align-items:center;">
+      <span style="font-size: 12px; width: 120px">所属公司:</span>
+      <el-select
+        v-model="queryParams.assessType"
+        size="small"
+        clearable>
+
+      <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id" />
+
+      </el-select>
+      &nbsp;&nbsp;
+      <el-input v-model="input" placeholder="请输入内容"  size="small"></el-input>
+
+  
+      &nbsp;&nbsp;<el-button
+        class="search"
+        style="margin-left: 5px"
+        type="primary"
+        size="small"
+        @click="buildReportQuery()"
+      >查询</el-button>
+    </div>
+<!--table主体-->
+    <div>
+      <el-button
+        class="search"
+        style="margin-left: 10px"
+        type="success"
+        size="small"
+        @click="reportClick()"
+      >添加</el-button>
+      <el-button
+        class="search"
+        style="margin-left: 10px"
+        type="warning"
+        size="small"
+        :disabled="multipleSelection.length!==1"
+        @click="editClick()"
+      >修改</el-button>
+      <el-button
+        class="search"
+        style="margin-left: 10px"
+        type="danger"
+        size="small"
+        :disabled="multipleSelection.length==0"
+        @click="deleteClick()"
+      >删除</el-button>
+    </div>
+  </div>
+  <div class="tableheight">
+    <table-item
+      :table-data="buildsiteData"
+      :column="column"
+      :for-id="true"
+      :pagination="true"
+      :pagesize="pageInfo.size"
+      :currentpage="pageInfo.current"
+      :border="true"
+      :multiple="true"
+      :total="pageInfo.tableTotal"
+      :fixed="true"
+      :isdelete="false"
+      :is-select="false"
+      :stripe="true"
+      @handleCurrentChange="handleCurrentChange"
+      @handleSelectionChange="handleSelectionChange"
+      @handleSizeChange="handleSizeChange"
+      @rowDblclick="showBuild"
+      @detail="showBuild"
+    />
+  </div>
+
+<!--   
+  <el-dialog
+    :visible.sync="reportDialog"
+    title="新增"
+    width="600px"
+    top="5vh"
+  >
+    <KpiStandardDialog :report-form="reportForm" :is-look="false" />
+    <template slot="footer">
+      <el-button size="small" @click="cancelReport()">取消</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        @click="confirmBuildReport()"
+      >确定</el-button>
+    </template>
+  </el-dialog>
+  <el-dialog :visible.sync="dialogDetail" title="查看" width="600px" top="5vh">
+    <KpiStandardDialog :report-form="detailData" :is-look="true" />
+    <template slot="footer">
+      <el-button size="small" @click="dialogDetail=false">取消</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        @click="dialogDetail=false"
+      >确定</el-button>
+    </template>
+  </el-dialog>
+  <el-dialog :visible.sync="editDialog" title="修改" width="600px" top="5vh">
+    <KpiStandardDialog :report-form="editData" :is-look="false" />
+    <template slot="footer">
+      <el-button size="small" @click="cancelEdit">取消</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        @click="editItem"
+      >确定</el-button>
+    </template>
+  </el-dialog> -->
+</div>
+</template>
+  <script>
+import TableItem from '@/components/TableAuto'
+// import KpiStandardDialog from './components/kpiStandardDialog'
+import { queryKpiStandardList, addKpiStandardList, editKpiStandardList, deleteKpiStandardList } from '@/api/DMA/zoningManage'
+import { getCompanyTree,getCompany } from '@/api/base'
+
+export default {
+  name: 'priceList',
+  components: { TableItem },
+  props: ['data'],
+  data() {
+    return {
+      multipleSelection: [], // 表格选中数据
+      pageInfo: { current: 1, size: 10, tableTotal: 1 }, // 分页数据
+      column: [
+        {
+          label: '公司',
+          prop: 'code',
+          align: 'center',
+          sortable: true
+        },
+        {
+          label: '水价编码',
+          prop: 'code',
+          align: 'center',
+          sortable: true
+        },
+        {
+          label: '水价名称',
+          prop: 'name',
+          align: 'center',
+          percent: true,
+          sortable: true
+        },
+        {
+          label: '用水类型',
+          prop: 'useWaterType',
+          align: 'center',
+          sortable: true
+        },
+        {
+          label: '水价',
+          prop: 'price',
+          align: 'center',
+          sortable: true
+        },
+        {
+          label: '污水费单价',
+          prop: 'sewageFeePrice',
+          align: 'center',
+          sortable: true
+        },
+        {
+          label: '垃圾费单价',
+          prop: 'garbageFeePrice',
+          align: 'center',
+          sortable: true
+        },
+        {
+          label: '创建时间',
+          prop: 'cdate',
+          align: 'center',
+          sortable: true
+        }
+       
+      ],
+      buildAry: {}, // 详情组件参数
+      queryParams: {
+        // 查询参数
+        assessContent: undefined,
+        assessType: undefined //
+      },
+      buildsiteData: [], // table表格数据
+
+      reportDialog: false, // 上报弹窗
+      editDialog: false, // 编辑弹窗
+      reportForm: {
+        assessStandard: undefined,
+        assessContent: undefined,
+        assessType: undefined,
+        remark: undefined
+      },
+      dialogDetail: false, // 控制详情页面的显示
+      // 详情数据
+      detailData: {},
+      editData: null,
+      assessTypeName: [
+        { id: '1', name: '巡线效率' },
+        { id: '2', name: '区域漏损率' },
+        { id: '3', name: '处漏效率' },
+        { id: '4', name: '区域漏损指标任务' },
+        { id: '5', name: '绩效任务' }
+      ],
+      company:null
+    }
+  },
+  watch: {
+    reportDialog(newVal, oldVal) {
+      console.log('上报Dialog:' + newVal ? '打开' : '关闭')
+      if (!newVal) {
+        this.clearPageInfo()
+      }
+    }
+  },
+  created() {
+    getCompanyTree({}).then(res => {
+       console.log(res.result)
+       this.company=res.result
+        console.log("print:"+company)
+    })
+   
+  },
+  mounted() {
+    this.getData()
+  },
+  destroyed() {
+  },
+  methods: {
+    /* --------------------- 界面操作 ----------------*/
+    /**
+     * @description 清除页面相关数据 => Map、表单数据
+     */
+    clearPageInfo() {
+      // 表单数据
+      for (var key in this.reportForm) {
+        // console.log("key值:"+key)
+        this.reportForm[key] = undefined
+      }
+    },
+
+    /* --------------------- 分页查询 ---------------*/
+    /**
+     * @description 分页每页条数
+     */
+    handleSizeChange(pageSize) {
+      this.pageInfo.size = pageSize
+      this.getData()
+    },
+    /**
+     * @description 改变当前页
+     */
+    handleCurrentChange(currentPage) {
+      this.pageInfo.current = currentPage
+      this.getData()
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
+    /* --------------------- API请求 ----------------*/
+
+    /**
+     * @description 查询应急事件列表
+     */
+    buildReportQuery() {
+      this.pageInfo.current = 1
+      this.getData()
+    },
+    editClick() {
+      this.editDialog = true
+      this.editData = this.multipleSelection[0]
+    },
+    cancelEdit() {
+      this.editDialog = false
+      this.getData()
+    },
+    deleteClick() {
+      this.$confirm('此操作将删除所选记录, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.deleteItem()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+    /**
+     *  @description 查询应急事件列表
+     */
+    getData() {
+      var that = this
+      // 追加分页参数
+      const query = that.pageInfo
+      Object.assign(query, that.queryParams)
+      console.log('query参数:' + JSON.stringify(that.pageInfo))
+      that.buildsiteData = []
+      queryKpiStandardList(query).then((res) => {
+        if (res.code !== 1) {
+          that.$message.error('获取信息出错!')
+          return
+        }
+        // 数据总数
+        that.pageInfo.tableTotal = res.result.total
+        that.buildsiteData = res.result.records
+      })
+    },
+
+    /**
+     * @description 应急事件上报
+     */
+    reportClick() {
+      // this.$message.info('请点击地图获取坐标')
+      const that = this
+      that.reportDialog = true // 显示弹窗
+    },
+    /**
+     * @description 工地信息上报,提交数据库
+     */
+    confirmBuildReport() {
+      var that = this
+      Number(this.reportForm.assessStandard)
+      addKpiStandardList(this.reportForm).then(res => {
+        if (res.code == 1) {
+          that.$message.success('新增成功')
+          this.reportDialog = false
+          that.buildReportQuery()
+        } else {
+          that.$message(res.message)
+        }
+      })
+    },
+    editItem() {
+      var that = this
+      // 校验
+      editKpiStandardList(this.editData).then(res => {
+        if (res.code == 1) {
+          that.$message.success('修改成功')
+          this.editDialog = false
+          that.buildReportQuery()
+        } else {
+          that.$message(res.message)
+        }
+      })
+    },
+    deleteItem() {
+      var ids = this.multipleSelection.map(item => {
+        return item.id
+      })
+      deleteKpiStandardList({ ids: ids.join() }).then(res => {
+        if (res.code == 1) {
+          this.$message.success('删除成功')
+          this.buildReportQuery()
+        } else {
+          this.$message(res.message)
+        }
+      })
+    },
+    /**
+     * @description 取消上报
+     */
+    cancelReport() {
+      this.reportDialog = false // 关闭上报弹窗
+      this.clearPageInfo()
+    },
+
+    /**
+     * @description 判断字符串是否为空
+     */
+    strIsNull(strVal) {
+      strVal = strVal || ''
+      return typeof strVal == 'undefined' || strVal == null || strVal == ''
+    },
+
+    /**
+     * @description 查看事件详情
+     */
+    showBuild(data) {
+      this.detailData = data
+      this.dialogDetail = true
+      // })
+    }
+  }
+}
+</script>
+
+<style lang='scss' scoped>
+.wxReport {
+  height: 100%;
+  width: 100%;
+  padding: 5px;
+
+  .filteroption {
+    width: 100%;
+    height: 40px;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+
+  .tableheight{
+    margin-top: 4px;
+    height: calc(100% - 44px);
+  }
+}
+
+/deep/ .el-upload {
+  justify-content: flex-start;
+}
+</style>
+
+<style>
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+  -webkit-appearance: none !important;
+}
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+</style>