Browse Source

Merge branch 'master' of http://192.168.2.241:3000/hdc/java-collect-fees-front

shudong 1 year ago
parent
commit
967c76579a

+ 2 - 0
src/router/_import.js

@@ -252,6 +252,8 @@ const map = {
   customerBatch: () => import('@/views/mis/customerManagement/customerBatch-index'), // 用户管理-用户批量建档
   customerRelationship: () => import('@/views/mis/customerManagement/customerRelationship-index'), // 用户管理-用户抄收关系
   customerGh: () => import('@/views/mis/customerManagement/customerGh-index'), // 用户管理-更名过户处理
+  customerBt: () => import('@/views/mis/customerManagement/customerBt-index'), // 用户管理-用户报停处理
+  customerXh: () => import('@/views/mis/customerManagement/customerXh-index'), // 用户管理-用户销户处理
   priceList: () => import('@/views/mis/financialManage/priceManage/priceList'), // 水价管理   
   meterInfo: () => import('@/views/mis/meterManage/meterInfo/meter-index'), // 水表档案
   meterChange: () => import('@/views/mis/meterManage/meterChange/meterChange-index'), // 用户换表 

+ 32 - 3
src/views/mis/common/api/customerManagement.js

@@ -154,13 +154,42 @@ const CustomerFfgx = {
  * @description 更名过户
  */
 const CustomerGh = {
-    add(requestParams) {
+    save(requestParams, otherParams) {
         return request({
             url: '/fees/api/userprofilemgt/daghlog',
             method: 'post',
-            data: requestParams
+            data: requestParams,
+            params: otherParams
+        })
+    }
+}
+
+/**
+ * @description 报停处理
+ */
+const CustomerBt = {
+    save(requestParams, otherParams) {
+        return request({
+            url: '/fees/api/userprofilemgt/dabtlog',
+            method: 'post',
+            data: requestParams,
+            params: otherParams
+        })
+    }
+}
+
+/**
+ * @description 销户处理
+ */
+const CustomerXh = {
+    save(requestParams, otherParams) {
+        return request({
+            url: '/fees/api/userprofilemgt/dahlog',
+            method: 'post',
+            data: requestParams,
+            params: otherParams
         })
     }
 }
 
-export { Customer, CustomerBatch, BwMeterZfb, CustomerFfgx,CustomerGh };
+export { Customer, CustomerBatch, BwMeterZfb, CustomerFfgx, CustomerGh, CustomerBt, CustomerXh };

+ 25 - 0
src/views/mis/common/api/feesApi.js

@@ -13,6 +13,11 @@ const feesApi = {
             params: requestParams
         })
     },
+    /**
+     * 预付费收取
+     * @param {*} data 
+     * @returns 
+     */
     chargeOnAdvPayment(data){
         return request({
             url: '/fees/api/feesmgt/sfcharge/ChargeAdvPayment',
@@ -20,6 +25,11 @@ const feesApi = {
             data
         })
     },
+    /**
+     * @description 查询历史缴费信息
+     * @param {*} requestParams 
+     * @returns 
+     */
     queryCharge(requestParams){
         return request({
             url: '/fees/api/feesmgt/sfcharge/pageInfo',
@@ -27,12 +37,27 @@ const feesApi = {
             params: requestParams
         })
     },
+    /**
+     * @description 查询当日收费信息
+     * @param {*} requestParams 
+     * @returns 
+     */
     queryTodayChargeInfo(requestParams){
         return request({
             url: '/fees/api/feesmgt/sfcharge/GetToDayChargeInfo',
             method: 'get',
             params: requestParams
         })
+    },
+    /**
+     * @description 欠费收取
+     */
+    chargePayment(data){
+        return request({
+            url: '/fees/api/feesmgt/sfcharge/ChargePayment',
+            method: 'post',
+            data
+        })
     }
 }
 

+ 99 - 96
src/views/mis/common/assets/scripts/utils.js

@@ -8,6 +8,9 @@ const DateHelper = {
         var currentdate = this.formattingDate(date, formatter);
         return currentdate;
     },
+    getNowDateZeroTime: function () {
+        return this.getNowFormatDate(false) + " 00:00:00";
+    },
     /*格式化时间字符串*/
     formattingDate: function (x, y) {
         var z = {
@@ -47,117 +50,117 @@ const DateHelper = {
 
 const StringHelper = {
 
-    stringFormat: function (formatted, args) { 
-            for (let i = 0; i < args.length; i++) {
-                let regexp = new RegExp('\\{' + i + '\\}', 'gi')
-                formatted = formatted.replace(regexp, args[i])
-            }
-            return formatted 
+    stringFormat: function (formatted, args) {
+        for (let i = 0; i < args.length; i++) {
+            let regexp = new RegExp('\\{' + i + '\\}', 'gi')
+            formatted = formatted.replace(regexp, args[i])
+        }
+        return formatted
     }
 }
 
 /* ----- 数字辅助 ----- */
 const NumberHelper = {
-        /**
-      * @description 加   
-      */
-        accAdd: function (arg1, arg2) {
-            var r1, r2, m;
-            try {
-                r1 = arg1.toString().split(".")[1].length;
-            } catch (e) {
-                r1 = 0;
-            }
-            try {
-                r2 = arg2.toString().split(".")[1].length;
-            } catch (e) {
-                r2 = 0;
-            }
-            m = Math.pow(10, Math.max(r1, r2));
-            return (arg1 * m + arg2 * m) / m;
-        },
-        /**
-        * @description 减    
-        */
-        accSub: function (arg1, arg2) {
-            return this.accAdd(arg1, -arg2);
-        },
-        accMul: function (arg1, arg2) {
-            var m = 0,
-                s1 = arg1.toString(),
-                s2 = arg2.toString();
-            try {
-                m += s1.split(".")[1].length;
-            } catch (e) { }
-            try {
-                m += s2.split(".")[1].length;
-            } catch (e) { }
-            return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
-        },
-        accDiv: function (arg1, arg2) {
-            var t1 = 0,
-                t2 = 0,
-                r1, r2;
-            try {
-                t1 = arg1.toString().split(".")[1].length;
-            } catch (e) { }
-            try {
-                t2 = arg2.toString().split(".")[1].length;
-            } catch (e) { }
-
-            r1 = Number(arg1.toString().replace(".", ""));
-            r2 = Number(arg2.toString().replace(".", ""));
-            return (r1 / r2) * Math.pow(10, t2 - t1);
+    /**
+  * @description 加   
+  */
+    accAdd: function (arg1, arg2) {
+        var r1, r2, m;
+        try {
+            r1 = arg1.toString().split(".")[1].length;
+        } catch (e) {
+            r1 = 0;
+        }
+        try {
+            r2 = arg2.toString().split(".")[1].length;
+        } catch (e) {
+            r2 = 0;
         }
+        m = Math.pow(10, Math.max(r1, r2));
+        return (arg1 * m + arg2 * m) / m;
+    },
+    /**
+    * @description 减    
+    */
+    accSub: function (arg1, arg2) {
+        return this.accAdd(arg1, -arg2);
+    },
+    accMul: function (arg1, arg2) {
+        var m = 0,
+            s1 = arg1.toString(),
+            s2 = arg2.toString();
+        try {
+            m += s1.split(".")[1].length;
+        } catch (e) { }
+        try {
+            m += s2.split(".")[1].length;
+        } catch (e) { }
+        return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
+    },
+    accDiv: function (arg1, arg2) {
+        var t1 = 0,
+            t2 = 0,
+            r1, r2;
+        try {
+            t1 = arg1.toString().split(".")[1].length;
+        } catch (e) { }
+        try {
+            t2 = arg2.toString().split(".")[1].length;
+        } catch (e) { }
+
+        r1 = Number(arg1.toString().replace(".", ""));
+        r2 = Number(arg2.toString().replace(".", ""));
+        return (r1 / r2) * Math.pow(10, t2 - t1);
     }
+}
 
 /* ----- 文件辅助 ----- */
 const FileHelper = {
-        /**
-         * 导出Excel
-         * @param {*} res 后端返回的文件(二进制文件流)
-         * @param {*} fileName 文件名
-         */
-        exportExcel: function (res, fileName) {
-            const blob = new Blob([res], { type: "application/vnd.ms-excel;charset=UTF-8" });
-            const elink = document.createElement("a"); // 创建a标签
-            elink.download = fileName; // 为a标签添加download属性 // a.download = fileName; //命名下载名称
-            elink.style.display = "none";
-            elink.href = URL.createObjectURL(blob);
-            document.body.appendChild(elink);
-            elink.click(); // 点击下载
-            console.log(elink.href);
-            URL.revokeObjectURL(elink.href); // 释放URL 对象
-            document.body.removeChild(elink); // 释放标签
-        },
-        /**
-         * 下载
-         */
-        download: function () {
+    /**
+     * 导出Excel
+     * @param {*} res 后端返回的文件(二进制文件流)
+     * @param {*} fileName 文件名
+     */
+    exportExcel: function (res, fileName) {
+        const blob = new Blob([res], { type: "application/vnd.ms-excel;charset=UTF-8" });
+        const elink = document.createElement("a"); // 创建a标签
+        elink.download = fileName; // 为a标签添加download属性 // a.download = fileName; //命名下载名称
+        elink.style.display = "none";
+        elink.href = URL.createObjectURL(blob);
+        document.body.appendChild(elink);
+        elink.click(); // 点击下载
+        console.log(elink.href);
+        URL.revokeObjectURL(elink.href); // 释放URL 对象
+        document.body.removeChild(elink); // 释放标签
+    },
+    /**
+     * 下载
+     */
+    download: function () {
 
-        }
     }
+}
 
 /* ----- Object对象辅助 ----- */
 const ObjectHelper = {
-        /**
-         * 对象属性转FormData
-         * @param {*} obj 对象
-         * @returns FormData实例
-         */
-        propsToFormData: function (obj) {
-            const formData = new FormData()
-            Object.keys(obj).forEach((key) => {
-                if (obj[key] instanceof Array) {
-                    obj[key].forEach((item) => {
-                        formData.append(key, item)
-                    })
-                    return
-                }
-                formData.append(key, obj[key])
-            })
-            return formData
-        }
+    /**
+     * 对象属性转FormData
+     * @param {*} obj 对象
+     * @returns FormData实例
+     */
+    propsToFormData: function (obj) {
+        const formData = new FormData()
+        Object.keys(obj).forEach((key) => {
+            if (obj[key] instanceof Array) {
+                obj[key].forEach((item) => {
+                    formData.append(key, item)
+                })
+                return
+            }
+            formData.append(key, obj[key])
+        })
+        return formData
     }
+}
 
 export { DateHelper, NumberHelper, FileHelper, ObjectHelper, StringHelper };

+ 4 - 0
src/views/mis/common/assets/styles/misStyle.scss

@@ -54,6 +54,10 @@
             margin-left: 5px !important;
         }
     }
+
+    .MIS_FORM .el-input>input[readonly][placeholder="请输入"] {
+        background-color: rgb(245, 247, 250);
+    }
 }
 
 .mis-flex-center {

+ 89 - 60
src/views/mis/common/components/cps-customer.vue

@@ -25,37 +25,35 @@
       </template>
     </el-dialog>
   </div> -->
-  <div class="container"> 
-    <div class="search"  >
-    <el-input class="input" v-model="queryParams.searchText" size="small" 
-      placeholder="关键字:用户编号、用户姓名、地址、联系电话..." clearable autocomplete="off"   @keyup.enter.native="onShow" />
-    <el-button type="primary" size="small" @click="onShow()">查询</el-button>
+  <!---->
+  <div class="container">
+    <div class="search">
+      <el-input class="input" ref="inputPrFile" v-model="queryParams.searchText" size="small"
+        placeholder="关键字:用户编号、用户姓名、地址、联系电话..." clearable autocomplete="off" @keyup.enter.native="onShow" />
+      <el-button ref="btnPr" type="primary" size="small" @click="onShow">查询</el-button>
 
-    <el-dialog :v-show="isShow" :visible.sync="isShow" title="用户查询" width="800px" top="5vh" v-dialogDrag>
-      <div class="filteroption">
-        <el-input v-model="queryParams.searchText" size="small" style="width:350px;margin-right: 5px "
-          placeholder="关键字:用户编号、用户姓名、地址、联系电话..." clearable autocomplete="off" />
+      <el-dialog :v-show="isShow" :visible.sync="isShow" title="用户查询" width="800px" top="5vh" v-dialogDrag>
+        <div class="filteroption">
+          <el-input v-model="queryParams.searchText" size="small" style="width:350px;margin-right: 5px "
+            placeholder="关键字:用户编号、用户姓名、地址、联系电话..." clearable autocomplete="off" />
 
-        <el-button type="primary" size="small" @click="onSearch()">查询</el-button>
-        <el-button type="primary" size="small" @click="onSelect()">选择</el-button>
-      </div>
-      <div class="tableHeight">
-        <table-item :table-data="buildsiteData" :column="column" :for-id="false" :pagination="true"
-          :pagesize="pageInfo.size" :currentpage="pageInfo.current" :border="true" :multiple="false"
-          :total="pageInfo.tableTotal" :fixed="true" :isdelete="false" :is-select="true" :stripe="true"
-          @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange" @rowDblclick="rowDblclick"
-          @rowClick="rowClick" />
-      </div>
-      <template slot="footer">
-        <el-button size="small" @click="cancelReport()">关闭</el-button>
-      </template>
-    </el-dialog>
-  </div> 
+          <el-button type="primary" size="small" @click="onSearch()">查询</el-button>
+          <el-button type="primary" size="small" @click="onSelect()">选择</el-button>
+        </div>
+        <div class="tableHeight">
+          <table-item :table-data="buildsiteData" :column="column" :for-id="false" :pagination="true"
+            :pagesize="pageInfo.size" :currentpage="pageInfo.current" :border="true" :multiple="false"
+            :total="pageInfo.tableTotal" :fixed="true" :isdelete="false" :is-select="true" :stripe="true"
+            @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange" @rowDblclick="rowDblclick"
+            @rowClick="rowClick" />
+        </div>
+        <template slot="footer">
+          <el-button size="small" @click="cancelReport()">关闭</el-button>
+        </template>
+      </el-dialog>
+    </div>
 
   </div>
-
-
-   
 </template>
 <script>
 import TableItem from '@/components/TableAuto'
@@ -70,6 +68,7 @@ export default {
     return {
       isShow: false,
       reportDialog: true,
+      boolSearchIsChange: false,
       buildsiteData: [],
       multipleSelection: [],
       pageInfo: { current: 1, size: 10, tableTotal: 0 },
@@ -118,11 +117,14 @@ export default {
     this.getData()
   },
   watch: {
-    params(curVal, oldVal) {
-      if (curVal) {
-        alert(curVal)
-      }
-    }
+    // 'queryParams.searchText'(newVal, oldVal) {
+    //   alert(newVal+", old "+ oldVal)
+    //   if (oldVal != newVal) {
+    //     this.boolSearchIsChange = true
+    //   } else {
+    //     this.boolSearchIsChange = false
+    //   }
+    // }
   },
   methods: {
     /**
@@ -131,21 +133,22 @@ export default {
     getData() {
       let params = Object.assign({}, this.pageInfo, this.queryParams)
       params.searchText = this.queryParams.searchText
+      params.customerState=1
       // alert( this.queryParams.searchText)
       this.buildsiteData = []
-      this.loading = true 
+      this.loading = true
       Customer.query(params).then((res) => {
         if (res.code !== 1) {
           this.$message.error('查询失败!')
           return
-        } 
+        }
         // 数据总数
         this.pageInfo.tableTotal = res.result.total
         this.buildsiteData = res.result.records
-        if (res.result.total == 1) { 
-          this.multipleSelection = res.result.records[0] 
-          this.isShow=false
-          this.queryParams.searchText=this.multipleSelection.customerNo 
+        if (res.result.total == 1) {
+          this.multipleSelection = res.result.records[0]
+          this.isShow = false
+          this.queryParams.searchText = this.multipleSelection.customerNo
           this.$emit('selValue', this.multipleSelection)
         }
       }).catch((ex) => {
@@ -176,7 +179,7 @@ export default {
 
     },
     rowClick(row) {
-      this.multipleSelection = row 
+      this.multipleSelection = row
     },
     /**
      * 双击选择
@@ -184,7 +187,7 @@ export default {
     rowDblclick(row, column, event) {
       this.multipleSelection = row
       this.isShow = false
-      if (row != null) { 
+      if (row != null) {
         this.queryParams.searchText = this.multipleSelection.customerNo
         this.$emit('selValue', row)
       }
@@ -198,13 +201,13 @@ export default {
     /**
      *选择
      **/
-    onSelect() { 
+    onSelect() {
       this.isShow = false
-      if(this.multipleSelection!=null){
-       this.queryParams.searchText = this.multipleSelection.customerNo
-       this.$emit('selValue', this.multipleSelection)
+      if (this.multipleSelection != null) {
+        this.queryParams.searchText = this.multipleSelection.customerNo
+        this.$emit('selValue', this.multipleSelection)
       }
-    
+
     },
     cancelReport() {
       //this.changeMsg(false)
@@ -212,17 +215,41 @@ export default {
       this.isShow = false
       //this.$emit('changeShowState', false)
       //this.$parent.changeShowState(false)
-    }, 
+    },
     onShow() { 
-      this.isShow = true
-      this.onFirstPage()
+      //debugger
+        this.isShow = true
+        this.onFirstPage() 
     },
-    onSetValue() {  
+    onSetValue() {
 
     },
-    onFirstPage(){
-      this.pageInfo.current=1
+    onFirstPage() {
+      this.pageInfo.current = 1
       this.getData()
+    },
+    /**
+     * @description 获取焦点
+    */
+    onFileInputFocus() {
+      this.$refs.inputPrFile.focus()
+      this.isShow=false
+    }
+    /**
+   * @description 获取焦点
+  */
+    , onFileInputFocusAndSelect() {
+      this.isShow=false
+      this.$nextTick(() => {
+        this.$refs.inputPrFile.focus()
+        this.$refs.inputPrFile.select()
+      
+      })
+    }
+    , onSearchBtnFocus() {
+      this.$refs.btnPr.$el.focus()
+      this.isShow=false
+    
     }
   }
 }
@@ -233,11 +260,12 @@ export default {
   width: 100%;
   padding: 5px;
 
-  
+
 }
+
 /deep/ .el-input__inner::placeholder {
-  color: rgb(136,12,76);
-   
+  color: rgb(136, 12, 76);
+
 }
 
 .container {
@@ -247,7 +275,7 @@ export default {
   padding: 10px;
   overflow-y: auto;
 
-  
+
   .filteroption {
     width: 100%;
     height: 40px;
@@ -260,10 +288,11 @@ export default {
     margin-top: 4px;
     height: calc(58vh - 44px);
   }
-  
+
   .search {
     display: flex;
     width: 500px;
+
     input {
       padding: 0 0 0 14px;
       width: 550px;
@@ -290,7 +319,7 @@ export default {
       border-bottom: 0;
     }
 
-    button{
+    button {
       background-color: #4662D9;
       color: white;
       width: 80px;
@@ -298,7 +327,7 @@ export default {
       cursor: pointer;
     }
   }
- 
- 
-} 
+
+
+}
 </style>

+ 4 - 9
src/views/mis/customerManagement/customer-index.vue

@@ -49,7 +49,7 @@
             <el-main>
                 <tfTable :table-data="dataList" :column="columns" :for-id="true" :pagination="true"
                     :currentpage="pageInfo.current" :pagesize="pageInfo.size" :total="pageInfo.tableTotal" :border="true"
-                    :multiple="false" :fixed="true" :isdelete="false" :is-select="false" :stripe="true" :loading="loading"
+                    :multiple="false" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
                     @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
                     @handleSelectionChange="handleSelectionChange" @rowDblclick="showDetail" @detail="showDetail"
                     @sortChange="onCustomerSortChange" />
@@ -184,17 +184,16 @@ export default {
             disabledModify: true,
             disabledDelete: true,
             operationType: '',//编辑类型,'save','saveUpdate'
-            loading: false,// 控制表格查询时
             pageInfo: { current: 1, size: 20, tableTotal: 1, 'orders[0].asc': 'true', 'orders[0].column': 'customerNo' }, // 分页数据
             columns: [
                 {
                     label: '所属片区',
-                    prop: 'mrArea',
+                    prop: 'mrAreaName',
                     align: 'left'
                 },
                 {
                     label: '所属表册',
-                    prop: 'mrBook',
+                    prop: 'mrBookName',
                     align: 'left'
                 },
                 {
@@ -392,7 +391,6 @@ export default {
             }
 
             this.dataList = []
-            this.loading = true;
             Customer.query(params).then((res) => {
                 if (res.code !== 1) {
                     this.$message.error('查询失败!')
@@ -404,7 +402,6 @@ export default {
             }).catch((ex) => {
                 this.$message.error("查询失败!");
             }).finally(() => {
-                this.loading = false;
             });
         },
         resetDetailData() {
@@ -444,7 +441,7 @@ export default {
             Customer.cmdCustomerAndMeter(params, { operationType: this.operationType }).then(res => {
                 if (res.code == 1) {
                     this.bindList();
-                    this.$message.success("添加成功!");
+                    this.$message.success("保存成功!");
                     this.dialogVisible = false;
                 }
             });
@@ -470,13 +467,11 @@ export default {
         async export() {
             // 追加分页参数
             let params = Object.assign({}, this.queryParams);
-            this.loading = true;
             await Customer.exportFile(params).then((res) => {
                 FileHelper.exportExcel(res, '用户档案信息.xlsx');
             }).catch((ex) => {
                 this.$message.error("导出失败!");
             }).finally(() => {
-                this.loading = false;
             });
         },
         /**

+ 126 - 0
src/views/mis/customerManagement/customerBt-form.vue

@@ -0,0 +1,126 @@
+<template>
+  <!-- form表单 -->
+  <el-form :model="detailData" :disabled="editState" :rules="rules" :inline-message="true" :status-icon=true ref="form"
+    class="MIS_FORM">
+    <!-- descriptions描述列表 -->
+    <el-descriptions title="" :column="2" border size="mini">
+      <el-descriptions-item label="用户编号">
+        <el-form-item prop="customerNo">
+          <el-input v-model="detailData.customerNo" placeholder="请输入" maxlength="50" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="用户地址">
+        <el-form-item prop="customerAddress">
+          <el-input v-model="detailData.customerAddress" placeholder="请输入" maxlength="100" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="用户姓名">
+        <el-form-item prop="customerName">
+          <el-input v-model="detailData.customerName" placeholder="请输入" maxlength="50" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="联系电话">
+        <el-form-item prop="customerAddress">
+          <el-input v-model="detailData.customerPhone" placeholder="请输入" maxlength="100" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="申请人姓名" labelClassName="redStar">
+        <el-form-item prop="btApplyName">
+          <el-input v-model="detailData.btApplyName" placeholder="请输入" maxlength="50" clearable></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="申请人电话" labelClassName="redStar">
+        <el-form-item prop="phone">
+          <el-input v-model="detailData.phone" placeholder="请输入" maxlength="50" clearable></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="申请日期" labelClassName="redStar">
+        <el-form-item prop="applyDate">
+          <el-date-picker v-model="detailData.applyDate" type="date" placeholder="选择日期" style="width:100%;"
+            value-format="yyyy-MM-dd HH:mm:ss">
+          </el-date-picker>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item>
+
+      </el-descriptions-item>
+
+      <el-descriptions-item label="备注" :span="2">
+        <el-form-item prop="remark">
+          <el-input v-model="detailData.remark" placeholder="请输入" maxlength="50" clearable></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="验证欠费" :span="2">
+        <el-switch v-model="detailData.yzqf" active-text="需验证" inactive-text="不验证" active-value="1" inactive-value="0"
+          inactive-color="lightgray">
+        </el-switch>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="操作人员">
+        <el-form-item prop="operatorOname">
+          <el-input v-model="detailData.operatorOname" placeholder="请输入" maxlength="50" disabled></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="操作时间">
+        <el-input v-model="detailData.operatorDate" disabled></el-input>
+      </el-descriptions-item>
+
+    </el-descriptions>
+
+  </el-form>
+</template>
+
+<script>
+import cpsSelect from '@/views/mis/common/components/cps-select.vue'
+export default {
+  name: 'detail',
+  components: { cpsSelect },
+  props: {
+    detailData: {},
+    editState: false
+  },
+  data() {
+    return {
+      rules: {
+        btApplyName: [
+          { required: true, message: "请输入", trigger: "blur" }
+        ],
+        phone: [
+          { required: true, message: "请输入", trigger: "blur" }
+        ],
+        applyDate: [
+          { required: true, message: "请选择", trigger: ["blur", "change"] }
+        ]
+      }
+    }
+  },
+  computed: {
+  },
+  watch: {
+  },
+  mounted() {
+  },
+  created() {
+  },
+  destroyed() {
+  },
+  methods: {
+    /**
+     * form表单验证
+     */
+    validate() {
+      let flag = false;
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          flag = true;
+        }
+      });
+      return flag;
+    }
+  }
+}
+</script>

+ 324 - 0
src/views/mis/customerManagement/customerBt-index.vue

@@ -0,0 +1,324 @@
+<template>
+    <div class="mis-pageBox">
+        <!-- 主页 -->
+        <el-container>
+            <el-header height="40px">
+                <el-row>
+                    <el-col :span="20">
+                        <div style="display:flex;align-items:center;">
+                            <!--区域联动组件:公司、片区、抄表册-->
+                            <cpsLinkageArea :queryParams="queryParams" widthValue="150px"></cpsLinkageArea>&nbsp;
+                            关 键 字:&nbsp;<el-input v-model="queryParams.searchText" size="small" style="width:150px;"
+                                placeholder="输入关键字" clearable @keyup.enter.native="clickQuery()" />&nbsp;
+                            <el-button type="primary" size="small" icon="el-icon-search"
+                                @click="clickQuery()">查询</el-button>
+                        </div>
+                    </el-col>
+                    <el-col :span="4" class="list-opCol">
+                        <el-button type="warning" size="small" icon="el-icon-edit" @click="clickModify()"
+                            :disabled="disabledModify">报停</el-button>
+                    </el-col>
+                </el-row>
+            </el-header>
+            <el-main>
+                <tfTable :table-data="dataList" :column="columns" :for-id="true" :pagination="true"
+                    :currentpage="pageInfo.current" :pagesize="pageInfo.size" :total="pageInfo.tableTotal" :border="true"
+                    :multiple="false" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
+                    @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
+                    @rowClick="handleRowClick" @sortChange="onCustomerSortChange" />
+            </el-main>
+        </el-container>
+        <!-- 详情页 -->
+        <el-dialog v-if="dialogVisible" v-dialogDrag top="15vh" :title="dialogTitle" :visible.sync="dialogVisible"
+            width="800px" class="dialog">
+            <tfDetail :detailData="detailData" :editState="editState" ref="dForm" />
+            <template slot="footer">
+                <el-button type="primary" icon="el-icon-check" @click="clickSave()" v-if="!editState">确 定</el-button>
+                <el-button icon="el-icon-close" @click="clickCancel()">关 闭</el-button>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+  
+<script>
+import '@/views/mis/common/assets/styles/misStyle.scss'
+import { DateHelper } from '@/views/mis/common/assets/scripts/utils.js'
+import { Customer, CustomerBt } from '@/views/mis/common/api/customerManagement.js'
+import tfTable from '@/components/TableAuto/index.vue'
+import cpsLinkageArea from '@/views/mis/common/components/cps-linkageArea.vue';
+import tfDetail from './customerBt-form.vue'
+export default {
+    components: { cpsLinkageArea, tfTable, tfDetail },
+    props: ['data'],
+    data() {
+        return {
+            /* ----- 主页 ----- */
+            queryParams: {
+                companyBranch: undefined,//公司
+                mrArea: undefined,//片区
+                mrBook: undefined,//抄表本
+                searchText: undefined,//模糊查询
+            },
+            disabledModify: true,
+            /**
+             * 操作类型(0:查询,1:添加,2:修改,3:删除,4:查看详情)
+             */
+            opType: 0,
+            pageInfo: { current: 1, size: 20, tableTotal: 1, 'orders[0].asc': 'true', 'orders[0].column': 'customerNo' }, // 分页数据
+            columns: [
+                {
+                    label: '所属片区',
+                    prop: 'mrAreaName',
+                    align: 'left'
+                },
+                {
+                    label: '所属表册',
+                    prop: 'mrBookName',
+                    align: 'left'
+                },
+                {
+                    label: '用户编号',
+                    prop: 'customerNo',
+                    align: 'center',
+                    sortable: true
+                },
+                {
+                    label: '用户姓名',
+                    prop: 'customerName',
+                    align: 'center'
+                },
+                {
+                    label: '用户地址',
+                    prop: 'customerAddress',
+                    align: 'left',
+                    sortable: true
+                },
+                {
+                    label: '联系电话',
+                    prop: 'customerPhone',
+                    align: 'center'
+                },
+                {
+                    label: '申请日期',
+                    prop: 'applyDatetime',
+                    align: 'center',
+                    sortable: true,
+                    formatter: function (row, column, value, index) {
+                        return DateHelper.formatterDate(value);
+                    }
+                },
+                {
+                    label: '建档日期',
+                    prop: 'createdDatetime',
+                    align: 'center',
+                    sortable: true,
+                    formatter: function (row, column, value, index) {
+                        return DateHelper.formatterDate(value);
+                    }
+                },
+                {
+                    label: '建档人员',
+                    prop: 'createdOname',
+                    align: 'center'
+                },
+                {
+                    label: '用户状态',
+                    prop: 'customerState',
+                    align: 'center',
+                    formatter: function (row, column, value, index) {
+                        if (value == '作废用户') {
+                            // return Object.assign({}, { 'background-color': '#CDCDCD', 'text-decoration': 'line-through' }, definedParams)
+                            return '<div><span class="el-tag el-tag--danger el-tag--light">' + value + '</span></div>'
+                        }
+                        return value;
+                    }
+                }
+            ],
+            dataList: [], // 表格数据
+            selectedRow: null, //表格选中行
+
+            /* ----- 详情页 ----- */
+            dialogTitle: '添加',
+            editState: false,//编辑状态,true:禁用;false:启用
+            dialogVisible: false,
+            detailData: {
+                //id: undefined,//编号
+                companyBranch: undefined,//所属公司
+                mrArea: undefined,//所属抄表片区
+                mrBook: undefined,//所属抄表本
+                customerNo: undefined,//用户编号
+                customerAddress: undefined,//用户地址
+                customerName: undefined,//用户姓名
+                customerPhone: undefined,
+                btApplyName: undefined,//报停申请人员
+                phone: undefined,//报停电话
+                applyDate: undefined,//报停时间
+                remark: undefined,//备注说明
+                yzqf: undefined,//验证欠费(1:验证;0:不验证)
+                hfysFlag: undefined,//恢复用水标志(默认为0,1是已恢复)
+                hfbtDate: undefined,//恢复报停时间
+                operatorOcode: undefined,//操作人员编码
+                operatorOname: undefined,//操作人员姓名
+                operatorDate: undefined//操作时间
+            }
+        }
+    },
+    watch: {
+        selectedRow(value) {
+            this.disabledModify = this.selectedRow == null;
+        },
+        dialogVisible(newVal, oldVal) {
+            if (!newVal) {
+                this.resetDetailData()
+            }
+        }
+    },
+    created() {
+
+    },
+    mounted() {
+        this.bindList();
+    },
+    methods: {
+        /* ----- 方法 ----- */
+        /**
+         * @description 绑定列表
+         */
+        bindList() {
+            // 追加分页参数
+            let params = Object.assign({}, this.pageInfo, this.queryParams);
+
+            this.dataList = []
+            this.selectedRow = null
+            Customer.query(params).then((res) => {
+                if (res.code !== 1) {
+                    this.$message.error('查询失败!')
+                    return
+                }
+                // 数据总数
+                this.pageInfo.tableTotal = res.result.total
+                this.dataList = res.result.records
+            }).catch((ex) => {
+                this.$message.error("查询失败!");
+            }).finally(() => {
+            });
+        },
+        resetDetailData() {
+            // 表单数据
+            for (var key in this.detailData) {
+                //console.log("key值:" + key)
+                this.detailData[key] = undefined
+            }
+        },
+        /**
+         * 保存方法
+         */
+        save() {
+            let params = Object.assign({}, this.detailData);
+            params.customerNo = this.selectedRow.customerNo;
+            params.companyBranch = this.selectedRow.companyBranch;
+            params.mrArea = this.selectedRow.mrArea;
+            params.mrBook = this.selectedRow.mrBook;
+
+            params.operatorOcode = this.$store.state.user.username;
+            params.operatorOname = this.$store.state.user.realName;
+            params.operatorDate = DateHelper.getNowFormatDate(true);
+
+            //console.log(JSON.stringify(params));
+            CustomerBt.save(params, { yzqf: this.detailData.yzqf }).then(res => {
+                if (res.code == 1) {
+                    this.bindList();
+                    this.$message.success("报停成功!");
+                    this.dialogVisible = false;
+                } else {
+                    this.$message.error(res);
+                }
+            }).catch((ex) => {
+                this.$message.error("报停失败!");
+            }).finally(() => {
+            });
+        },
+
+        /* ----- dom事件 ----- */
+        /**
+         * @description 查询
+         */
+        clickQuery() {
+            this.pageInfo.current = 1
+            this.bindList()
+        },
+        /**
+         * @description 报停
+         */
+        clickModify() {
+            if (this.selectedRow != null) {
+                if (this.selectedRow.customerState == '作废用户' || this.selectedRow.customerState == '销户用户') {
+                    this.$message({
+                        message: '作废用户、销户用户不能操作报停!',
+                        type: 'warning'
+                    });
+                    return;
+                }
+
+                this.detailData.customerNo = this.selectedRow.customerNo
+                this.detailData.customerName = this.selectedRow.customerName
+                this.detailData.customerPhone = this.selectedRow.customerPhone
+                this.detailData.customerAddress = this.selectedRow.customerAddress
+                this.detailData.applyDate = DateHelper.getNowDateZeroTime();
+                this.detailData.yzqf = '1';
+                this.detailData.operatorOname = this.$store.state.user.realName
+                this.detailData.operatorDate = DateHelper.getNowFormatDate(true);
+
+                this.opType = 1;
+                this.dialogTitle = "报停";
+                this.editState = false;
+                this.dialogVisible = true;// 显示弹窗
+            }
+        },
+        /**
+         * 点击关闭(取消)
+         */
+        clickCancel() {
+            this.dialogVisible = false // 关闭弹窗
+        },
+        /**
+         * 点击确定(保存)
+         */
+        clickSave() {
+            let flag = this.$refs.dForm.validate();
+            if (flag) {
+                if (this.opType === 1) this.save();// 添加
+            }
+        },
+
+        /* ----- 组件事件 ----- */
+        /**
+         * @description 改变当前页
+         */
+        handleCurrentChange(current) {
+            this.pageInfo.current = current
+            this.bindList()
+        },
+        /**
+         * @description 分页每页条数
+         */
+        handleSizeChange(size) {
+            this.pageInfo.size = size
+            this.bindList()
+        },
+        /**
+         * @description 选择改变
+         */
+        handleRowClick(row) {
+            this.selectedRow = row
+        },
+        //排序事件
+        onCustomerSortChange(arrOrder) {
+            this.pageInfo['orders[0].asc'] = arrOrder[0];
+            this.pageInfo['orders[0].column'] = arrOrder[1];
+            this.bindList();
+        }
+    }
+}
+</script>
+  

+ 40 - 176
src/views/mis/customerManagement/customerGh-form.vue

@@ -1,126 +1,83 @@
 <template>
   <!-- form表单 -->
-  <el-form :model="detailData" :disabled="editState" :rules="rules" :inline-message="true" :status-icon=true ref="form" class="MIS_FORM">
+  <el-form :model="detailData" :disabled="editState" :rules="rules" :inline-message="true" :status-icon=true ref="form"
+    class="MIS_FORM">
     <!-- descriptions描述列表 -->
     <el-descriptions title="" :column="2" border size="mini">
-
-      <el-descriptions-item label="编号" labelClassName="redStar">
-        <el-form-item>
-          <el-input v-model="detailData.id" placeholder="自动生成" disabled></el-input>
-        </el-form-item>
-      </el-descriptions-item>
-      <el-descriptions-item label="所属公司">
-        <el-form-item prop="companyBranch">
-          <el-input v-model="detailData.companyBranch" placeholder="请输入" maxlength="50" clearable></el-input>
-        </el-form-item>
-      </el-descriptions-item>
-
-      <el-descriptions-item label="用户编号">
-        <el-form-item prop="customerNo">
-          <el-input v-model="detailData.customerNo" placeholder="请输入" maxlength="50" clearable></el-input>
-        </el-form-item>
-      </el-descriptions-item>
-
-      <el-descriptions-item label="原用户地址">
-        <el-form-item prop="oldCustomerAddr">
-          <el-input v-model="detailData.oldCustomerAddr" placeholder="请输入" maxlength="100" clearable></el-input>
-        </el-form-item>
-      </el-descriptions-item>
-
       <el-descriptions-item label="原用户姓名">
         <el-form-item prop="oldCustomerName">
-          <el-input v-model="detailData.oldCustomerName" placeholder="请输入" maxlength="100" clearable></el-input>
-        </el-form-item>
-      </el-descriptions-item>
-
-      <el-descriptions-item label="原联系电话">
-        <el-form-item prop="oldPhone">
-          <el-input v-model="detailData.oldPhone" placeholder="请输入" maxlength="50" clearable></el-input>
-        </el-form-item>
-      </el-descriptions-item>
-
-      <el-descriptions-item label="原证件类别">
-        <el-form-item prop="oldCertType">
-          <el-input v-model="detailData.oldCertType" placeholder="请输入" maxlength="50" clearable></el-input>
+          <el-input v-model="detailData.oldCustomerName" placeholder="请输入" maxlength="100" readonly></el-input>
         </el-form-item>
       </el-descriptions-item>
-
-      <el-descriptions-item label="原证件号码">
-        <el-form-item prop="oldCertNo">
-          <el-input v-model="detailData.oldCertNo" placeholder="请输入" maxlength="50" clearable></el-input>
-        </el-form-item>
-      </el-descriptions-item>
-
       <el-descriptions-item label="新用户姓名" labelClassName="redStar">
         <el-form-item prop="newCustomerName">
           <el-input v-model="detailData.newCustomerName" placeholder="请输入" maxlength="100" clearable></el-input>
         </el-form-item>
       </el-descriptions-item>
 
+      <el-descriptions-item label="原联系电话">
+        <el-form-item prop="oldPhone">
+          <el-input v-model="detailData.oldPhone" placeholder="请输入" maxlength="50" readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
       <el-descriptions-item label="新联系电话" labelClassName="redStar">
         <el-form-item prop="newCustomerPhone">
           <el-input v-model="detailData.newCustomerPhone" placeholder="请输入" maxlength="50" clearable></el-input>
         </el-form-item>
       </el-descriptions-item>
 
-      <el-descriptions-item label="新证件类别">
-        <el-form-item prop="NEW_CERT_TYPE">
-          <cpsSelect v-model="detailData.NEW_CERT_TYPE" placeholder="请选择" skey="zjlb"></cpsSelect>
+      <el-descriptions-item label="原用户地址">
+        <el-form-item prop="oldCustomerAddr">
+          <el-input v-model="detailData.oldCustomerAddr" placeholder="请输入" maxlength="100" readonly></el-input>
         </el-form-item>
       </el-descriptions-item>
-
-      <el-descriptions-item label="新证件号码" labelClassName="redStar">
-        <el-form-item prop="newCertNo">
-          <el-input v-model="detailData.newCertNo" placeholder="请输入" maxlength="50" clearable></el-input>
+      <el-descriptions-item label="新用户地址">
+        <el-form-item prop="newCustomerAddr">
+          <el-input v-model="detailData.newCustomerAddr" placeholder="请输入" maxlength="100" clearable></el-input>
         </el-form-item>
       </el-descriptions-item>
 
-      <el-descriptions-item label="操作时间">
-        <el-form-item prop="operatorDate">
-          <el-date-picker v-model="detailData.operatorDate" type="date" placeholder="选择日期" style="width:100%;" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
+      <el-descriptions-item label="原证件类别">
+        <el-form-item prop="oldCertType">
+          <cpsSelect v-model="detailData.oldCertType" placeholder="请选择" skey="tymb" :params="{ pcid: 10 }" disabled>
+          </cpsSelect>
         </el-form-item>
       </el-descriptions-item>
-
-      <el-descriptions-item label="操作人员编码">
-        <el-form-item prop="operatorOcode">
-          <el-input v-model="detailData.operatorOcode" placeholder="请输入" maxlength="50" clearable></el-input>
+      <el-descriptions-item label="新证件类别">
+        <el-form-item prop="newCertType">
+          <cpsSelect v-model="detailData.newCertType" placeholder="请选择" skey="tymb" :params="{ pcid: 10 }"></cpsSelect>
         </el-form-item>
       </el-descriptions-item>
 
-      <el-descriptions-item label="操作人员姓名">
-        <el-form-item prop="operatorOname">
-          <el-input v-model="detailData.operatorOname" placeholder="请输入" maxlength="50" clearable></el-input>
+      <el-descriptions-item label="原证件号码">
+        <el-form-item prop="oldCertNo">
+          <el-input v-model="detailData.oldCertNo" placeholder="请输入" maxlength="50" readonly></el-input>
         </el-form-item>
       </el-descriptions-item>
-
-      <el-descriptions-item label="备注">
-        <el-form-item prop="remark">
-          <el-input v-model="detailData.remark" placeholder="请输入" maxlength="50" clearable></el-input>
+      <el-descriptions-item label="新证件号码">
+        <el-form-item prop="newCertNo">
+          <el-input v-model="detailData.newCertNo" placeholder="请输入" maxlength="50" clearable></el-input>
         </el-form-item>
       </el-descriptions-item>
 
-      <el-descriptions-item label="类型(1:更名,2:过户)">
-        <el-form-item>
-          <el-switch v-model="detailData.operatorType" active-text="是" inactive-text="否" active-value="1" inactive-value="0" inactive-color="lightgray"></el-switch>
+      <el-descriptions-item label="备注" :span="2">
+        <el-form-item prop="remark">
+          <el-input v-model="detailData.remark" placeholder="请输入" maxlength="50" clearable></el-input>
         </el-form-item>
       </el-descriptions-item>
-
-      <el-descriptions-item label="新用户地址">
-        <el-form-item prop="newCustomerAddr">
-          <el-input v-model="detailData.newCustomerAddr" placeholder="请输入" maxlength="100" clearable></el-input>
-        </el-form-item>
+      <el-descriptions-item label="验证欠费" :span="2">
+        <el-switch v-model="detailData.yzqf" active-text="需验证" inactive-text="不验证" active-value="1" inactive-value="0"
+          inactive-color="lightgray">
+        </el-switch>
       </el-descriptions-item>
 
-      <el-descriptions-item label="片区">
-        <el-form-item prop="mrArea">
-          <el-input v-model="detailData.mrArea" placeholder="请输入" maxlength="50" clearable></el-input>
+      <el-descriptions-item label="操作人员">
+        <el-form-item prop="operatorOname">
+          <el-input v-model="detailData.operatorOname" placeholder="请输入" maxlength="50" disabled></el-input>
         </el-form-item>
       </el-descriptions-item>
-
-      <el-descriptions-item label="抄表本">
-        <el-form-item prop="mrBook">
-          <el-input v-model="detailData.mrBook" placeholder="请输入" maxlength="50" clearable></el-input>
-        </el-form-item>
+      <el-descriptions-item label="操作时间">
+        <el-input v-model="detailData.operatorDate" disabled></el-input>
       </el-descriptions-item>
 
     </el-descriptions>
@@ -140,105 +97,12 @@ export default {
   data() {
     return {
       rules: {
-        id: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        companyBranch: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        customerNo: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldCustomerAddr: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldCustomerName: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldPhone: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldCertType: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldCertNo: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
         newCustomerName: [
           { required: true, message: "请输入", trigger: "blur" }
         ],
         newCustomerPhone: [
           { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newCertType: [
-          { required: true, message: "请输入", trigger: "change" }
-        ],
-        newCertNo: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        operatorDate: [
-          { required: true, message: "请输入", trigger: ["blur", "change"] }
-        ],
-        operatorOcode: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        operatorOname: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        remark: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldFpNsrsbh: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldFpAddr: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldFpName: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldFpPhone: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldFpBankName: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldFpRemark: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        oldFpBankAccount: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newFpNsrsbh: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newFpAddr: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newFpName: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newFpPhone: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newFpBankName: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newFpRemark: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newFpBankAccount: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        newCustomerAddr: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        mrArea: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
-        mrBook: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
+        ]
       }
     }
   },

+ 50 - 57
src/views/mis/customerManagement/customerGh-index.vue

@@ -23,13 +23,13 @@
             <el-main>
                 <tfTable :table-data="dataList" :column="columns" :for-id="true" :pagination="true"
                     :currentpage="pageInfo.current" :pagesize="pageInfo.size" :total="pageInfo.tableTotal" :border="true"
-                    :multiple="false" :fixed="true" :isdelete="false" :is-select="false" :stripe="true" :loading="loading"
+                    :multiple="false" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
                     @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
-                    @handleSelectionChange="handleSelectionChange" @sortChange="onCustomerSortChange" />
+                    @rowClick="handleRowClick" @sortChange="onCustomerSortChange" />
             </el-main>
         </el-container>
         <!-- 详情页 -->
-        <el-dialog v-if="dialogVisible" v-dialogDrag top="20vh" :title="dialogTitle" :visible.sync="dialogVisible"
+        <el-dialog v-if="dialogVisible" v-dialogDrag top="15vh" :title="dialogTitle" :visible.sync="dialogVisible"
             width="800px" class="dialog">
             <tfDetail :detailData="detailData" :editState="editState" ref="dForm" />
             <template slot="footer">
@@ -43,7 +43,7 @@
 <script>
 import '@/views/mis/common/assets/styles/misStyle.scss'
 import { DateHelper } from '@/views/mis/common/assets/scripts/utils.js'
-import { Customer } from '@/views/mis/common/api/customerManagement.js'
+import { Customer, CustomerGh } from '@/views/mis/common/api/customerManagement.js'
 import tfTable from '@/components/TableAuto/index.vue'
 import cpsLinkageArea from '@/views/mis/common/components/cps-linkageArea.vue';
 import tfDetail from './customerGh-form.vue'
@@ -60,7 +60,6 @@ export default {
                 searchText: undefined,//模糊查询
             },
             disabledModify: true,
-            disabledDelete: true,
             /**
              * 操作类型(0:查询,1:添加,2:修改,3:删除,4:查看详情)
              */
@@ -69,12 +68,12 @@ export default {
             columns: [
                 {
                     label: '所属片区',
-                    prop: 'mrArea',
+                    prop: 'mrAreaName',
                     align: 'left'
                 },
                 {
                     label: '所属表册',
-                    prop: 'mrBook',
+                    prop: 'mrBookName',
                     align: 'left'
                 },
                 {
@@ -136,15 +135,14 @@ export default {
                 }
             ],
             dataList: [], // 表格数据
-            selectionsData: [], // 表格选中数据
-            selectedRow: {}, //表格选中行
+            selectedRow: null, //表格选中行
 
             /* ----- 详情页 ----- */
             dialogTitle: '添加',
             editState: false,//编辑状态,true:禁用;false:启用
             dialogVisible: false,
             detailData: {
-                id: undefined,//编号
+                // id: undefined,//编号
                 companyBranch: undefined,//所属公司
                 customerNo: undefined,//用户编号
                 oldCustomerAddr: undefined,//原用户地址
@@ -160,6 +158,7 @@ export default {
                 operatorOcode: undefined,//操作人员编码
                 operatorOname: undefined,//操作人员姓名
                 remark: undefined,//备注
+                yzqf: undefined,//验证欠费(1:验证;0:不验证)
                 operatorType: undefined,//类型(1:更名,2:过户)
                 newCustomerAddr: undefined,//新用户地址
                 mrArea: undefined,//片区
@@ -168,9 +167,8 @@ export default {
         }
     },
     watch: {
-        selectionsData(value) {
-            this.disabledModify = this.selectionsData.length !== 1;
-            this.disabledDelete = this.selectionsData.length == 0;
+        selectedRow(value) {
+            this.disabledModify = this.selectedRow == null;
         },
         dialogVisible(newVal, oldVal) {
             if (!newVal) {
@@ -188,13 +186,13 @@ export default {
         /* ----- 方法 ----- */
         /**
          * @description 绑定列表
-         * @param {Boolean} 是否高级查询(true:是,false:否),默认false
          */
-        bindList(sfgjcx = false) {
+        bindList() {
             // 追加分页参数
             let params = Object.assign({}, this.pageInfo, this.queryParams);
 
             this.dataList = []
+            this.selectedRow = null
             Customer.query(params).then((res) => {
                 if (res.code !== 1) {
                     this.$message.error('查询失败!')
@@ -216,17 +214,32 @@ export default {
             }
         },
         /**
-         * 添加方法
+         * 保存方法
          */
-        add() {
+        save() {
             let params = Object.assign({}, this.detailData);
+            params.customerNo = this.selectedRow.customerNo;
+            params.companyBranch = this.selectedRow.companyBranch;
+            params.mrArea = this.selectedRow.mrArea;
+            params.mrBook = this.selectedRow.mrBook;
+            params.operatorType = '2';
 
-            ChargeChannel.add(params).then(res => {
+            params.operatorOcode = this.$store.state.user.username;
+            params.operatorOname = this.$store.state.user.realName;
+            params.operatorDate = DateHelper.getNowFormatDate(true);
+
+            //console.log(JSON.stringify(params));
+            CustomerGh.save(params, { yzqf: this.detailData.yzqf }).then(res => {
                 if (res.code == 1) {
                     this.bindList();
-                    this.$message.success("添加成功!");
+                    this.$message.success("过户成功!");
                     this.dialogVisible = false;
+                } else {
+                    this.$message.error(res);
                 }
+            }).catch((ex) => {
+                this.$message.error("过户失败!");
+            }).finally(() => {
             });
         },
 
@@ -242,47 +255,28 @@ export default {
          * @description 过户
          */
         clickModify() {
-            if (this.selectionsData.length > 0) {
-                this.selectedRow = this.selectionsData[0];
-                if (this.selectedRow.customerState == '作废用户') {
+            if (this.selectedRow != null) {
+                if (this.selectedRow.customerState == '作废用户' || this.selectedRow.customerState == '销户用户') {
                     this.$message({
-                        message: '作废用户不能修改!',
+                        message: '作废用户、销户用户不能操作过户!',
                         type: 'warning'
                     });
                     return;
                 }
 
-                var cbkhList = this.selectedRow.cbkhList.split(',')
-                if (cbkhList.length == 1) {
-                    //查询用户
-                    Customer.queryCustomer(this.selectedRow.customerNo).then((res) => {
-                        if (res.code == 1) {
-                            this.detailData.daCustomer = res.result
-                            this.detailData.daCustomer.mrArea = this.detailData.daCustomer.mrArea.toString();
-                            this.detailData.daCustomer.mrBook = this.detailData.daCustomer.mrBook.toString();
-
-                            //查询表具
-                            Customer.queryMeter(this.selectedRow.customerNo, this.selectedRow.customerNo + cbkhList[0]).then((res) => {
-                                if (res.code == 1) {
-                                    this.detailData.daMeter = res.result
-
-                                    this.operationType = 'saveUpdate';
-                                    this.dialogTitle = "修改";
-                                    this.editState = false;
-                                    this.dialogVisible = true;// 显示弹窗
-                                }
+                this.detailData.oldCustomerName = this.selectedRow.customerName
+                this.detailData.oldPhone = this.selectedRow.customerPhone
+                this.detailData.oldCustomerAddr = this.selectedRow.customerAddress
+                this.detailData.oldCertType = this.selectedRow.certType
+                this.detailData.oldCertNo = this.selectedRow.certNo
+                this.detailData.yzqf = '1';
+                this.detailData.operatorOname = this.$store.state.user.realName
+                this.detailData.operatorDate = DateHelper.getNowFormatDate(true);
 
-                            }).catch((ex) => {
-                                this.$message.error("查询表具信息失败!");
-                            });
-                        }
-
-                    }).catch((ex) => {
-                        this.$message.error("查询用户信息失败!");
-                    });
-                } else if (cbkhList.length > 1) {
-                    this.$message('该用户存在多表,请在“水表档案管理”中进行修改。');
-                }
+                this.opType = 1;
+                this.dialogTitle = "过户";
+                this.editState = false;
+                this.dialogVisible = true;// 显示弹窗
             }
         },
         /**
@@ -297,8 +291,7 @@ export default {
         clickSave() {
             let flag = this.$refs.dForm.validate();
             if (flag) {
-                if (this.opType === 1) this.add();// 添加
-                else if (this.opType === 2) this.modify();// 修改
+                if (this.opType === 1) this.save();// 添加
             }
         },
 
@@ -320,8 +313,8 @@ export default {
         /**
          * @description 选择改变
          */
-        handleSelectionChange(rows) {
-            this.selectionsData = rows
+        handleRowClick(row) {
+            this.selectedRow = row
         },
         //排序事件
         onCustomerSortChange(arrOrder) {

+ 6 - 6
src/views/mis/customerManagement/customerRelationship-index.vue

@@ -164,12 +164,12 @@ export default {
                 },
                 {
                     label: '所属片区',
-                    prop: 'mrArea',
+                    prop: 'mrAreaName',
                     align: 'left'
                 },
                 {
                     label: '所属表册',
-                    prop: 'mrBook',
+                    prop: 'mrBookName',
                     align: 'left'
                 },
                 {
@@ -222,12 +222,12 @@ export default {
             pageInfo_zfb: { current: 1, size: 50, tableTotal: 1, 'orders[0].asc': 'false', 'orders[0].column': 'operatorDatetime' }, // 分页数据
             columns_zfb: [
                 {
-                    label: '总表号',
+                    label: '总表户号',
                     prop: 'customerNoZb',
                     align: 'center'
                 },
                 {
-                    label: '分表号',
+                    label: '分表户号',
                     prop: 'customerNoFb',
                     align: 'center'
                 },
@@ -268,12 +268,12 @@ export default {
             pageInfo_ffgx: { current: 1, size: 50, tableTotal: 1, 'orders[0].asc': 'false', 'orders[0].column': 'operatorDatetime' }, // 分页数据
             columns_ffgx: [
                 {
-                    label: '总表用户编号',
+                    label: '主户用户编号',
                     prop: 'customerNoZb',
                     align: 'center'
                 },
                 {
-                    label: '分用户编号',
+                    label: '分用户编号',
                     prop: 'customerNoFb',
                     align: 'center'
                 },

+ 132 - 0
src/views/mis/customerManagement/customerXh-form.vue

@@ -0,0 +1,132 @@
+<template>
+  <!-- form表单 -->
+  <el-form :model="detailData" :disabled="editState" :rules="rules" :inline-message="true" :status-icon=true ref="form"
+    class="MIS_FORM">
+    <!-- descriptions描述列表 -->
+    <el-descriptions title="" :column="2" border size="mini">
+      <el-descriptions-item label="用户编号">
+        <el-form-item prop="customerNo">
+          <el-input v-model="detailData.customerNo" placeholder="请输入" maxlength="50" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="用户地址">
+        <el-form-item prop="costomerAddr">
+          <el-input v-model="detailData.costomerAddr" placeholder="请输入" maxlength="100" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="用户姓名">
+        <el-form-item prop="customerName">
+          <el-input v-model="detailData.customerName" placeholder="请输入" maxlength="50" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="联系电话">
+        <el-form-item prop="customerAddress">
+          <el-input v-model="detailData.customerPhone" placeholder="请输入" maxlength="100" clearable readonly></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="申请人姓名" labelClassName="redStar">
+        <el-form-item prop="applyName">
+          <el-input v-model="detailData.applyName" placeholder="请输入" maxlength="50" clearable></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="申请人电话" labelClassName="redStar">
+        <el-form-item prop="phone">
+          <el-input v-model="detailData.phone" placeholder="请输入" maxlength="50" clearable></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="申请日期" labelClassName="redStar">
+        <el-form-item prop="applyDate">
+          <el-date-picker v-model="detailData.applyDate" type="date" placeholder="选择日期" style="width:100%;"
+            value-format="yyyy-MM-dd HH:mm:ss">
+          </el-date-picker>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="水表止度" labelClassName="redStar">
+        <el-form-item prop="meterThisReading">
+          <el-input-number v-model="detailData.meterThisReading" placeholder="请输入" controls-position="right" :min="0"
+            style="width:100%"></el-input-number>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="备注" :span="2">
+        <el-form-item prop="remark">
+          <el-input v-model="detailData.remark" placeholder="请输入" maxlength="50" clearable></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="验证欠费" :span="2">
+        <el-switch v-model="detailData.yzqf" active-text="需验证" inactive-text="不验证" active-value="1" inactive-value="0"
+          inactive-color="lightgray">
+        </el-switch>
+      </el-descriptions-item>
+
+      <el-descriptions-item label="操作人员">
+        <el-form-item prop="operatorOname">
+          <el-input v-model="detailData.operatorOname" placeholder="请输入" maxlength="50" disabled></el-input>
+        </el-form-item>
+      </el-descriptions-item>
+      <el-descriptions-item label="操作时间">
+        <el-input v-model="detailData.operatorDate" disabled></el-input>
+      </el-descriptions-item>
+
+    </el-descriptions>
+
+  </el-form>
+</template>
+
+<script>
+import cpsSelect from '@/views/mis/common/components/cps-select.vue'
+export default {
+  name: 'detail',
+  components: { cpsSelect },
+  props: {
+    detailData: {},
+    editState: false
+  },
+  data() {
+    return {
+      rules: {
+        applyName: [
+          { required: true, message: "请输入", trigger: "blur" }
+        ],
+        phone: [
+          { required: true, message: "请输入", trigger: "blur" }
+        ],
+        applyDate: [
+          { required: true, message: "请选择", trigger: ["blur", "change"] }
+        ],
+        meterThisReading: [
+          { required: true, message: "请输入", trigger: "blur" }
+        ]
+      }
+    }
+  },
+  computed: {
+  },
+  watch: {
+  },
+  mounted() {
+  },
+  created() {
+  },
+  destroyed() {
+  },
+  methods: {
+    /**
+     * form表单验证
+     */
+    validate() {
+      let flag = false;
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          flag = true;
+        }
+      });
+      return flag;
+    }
+  }
+}
+</script>

+ 325 - 0
src/views/mis/customerManagement/customerXh-index.vue

@@ -0,0 +1,325 @@
+<template>
+    <div class="mis-pageBox">
+        <!-- 主页 -->
+        <el-container>
+            <el-header height="40px">
+                <el-row>
+                    <el-col :span="20">
+                        <div style="display:flex;align-items:center;">
+                            <!--区域联动组件:公司、片区、抄表册-->
+                            <cpsLinkageArea :queryParams="queryParams" widthValue="150px"></cpsLinkageArea>&nbsp;
+                            关 键 字:&nbsp;<el-input v-model="queryParams.searchText" size="small" style="width:150px;"
+                                placeholder="输入关键字" clearable @keyup.enter.native="clickQuery()" />&nbsp;
+                            <el-button type="primary" size="small" icon="el-icon-search"
+                                @click="clickQuery()">查询</el-button>
+                        </div>
+                    </el-col>
+                    <el-col :span="4" class="list-opCol">
+                        <el-button type="warning" size="small" icon="el-icon-edit" @click="clickModify()"
+                            :disabled="disabledModify">销户</el-button>
+                    </el-col>
+                </el-row>
+            </el-header>
+            <el-main>
+                <tfTable :table-data="dataList" :column="columns" :for-id="true" :pagination="true"
+                    :currentpage="pageInfo.current" :pagesize="pageInfo.size" :total="pageInfo.tableTotal" :border="true"
+                    :multiple="false" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
+                    @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
+                    @rowClick="handleRowClick" @sortChange="onCustomerSortChange" />
+            </el-main>
+        </el-container>
+        <!-- 详情页 -->
+        <el-dialog v-if="dialogVisible" v-dialogDrag top="15vh" :title="dialogTitle" :visible.sync="dialogVisible"
+            width="800px" class="dialog">
+            <tfDetail :detailData="detailData" :editState="editState" ref="dForm" />
+            <template slot="footer">
+                <el-button type="primary" icon="el-icon-check" @click="clickSave()" v-if="!editState">确 定</el-button>
+                <el-button icon="el-icon-close" @click="clickCancel()">关 闭</el-button>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+  
+<script>
+import '@/views/mis/common/assets/styles/misStyle.scss'
+import { DateHelper } from '@/views/mis/common/assets/scripts/utils.js'
+import { Customer, CustomerXh } from '@/views/mis/common/api/customerManagement.js'
+import tfTable from '@/components/TableAuto/index.vue'
+import cpsLinkageArea from '@/views/mis/common/components/cps-linkageArea.vue';
+import tfDetail from './customerXh-form.vue'
+export default {
+    components: { cpsLinkageArea, tfTable, tfDetail },
+    props: ['data'],
+    data() {
+        return {
+            /* ----- 主页 ----- */
+            queryParams: {
+                companyBranch: undefined,//公司
+                mrArea: undefined,//片区
+                mrBook: undefined,//抄表本
+                searchText: undefined,//模糊查询
+            },
+            disabledModify: true,
+            /**
+             * 操作类型(0:查询,1:添加,2:修改,3:删除,4:查看详情)
+             */
+            opType: 0,
+            pageInfo: { current: 1, size: 20, tableTotal: 1, 'orders[0].asc': 'true', 'orders[0].column': 'customerNo' }, // 分页数据
+            columns: [
+                {
+                    label: '所属片区',
+                    prop: 'mrAreaName',
+                    align: 'left'
+                },
+                {
+                    label: '所属表册',
+                    prop: 'mrBookName',
+                    align: 'left'
+                },
+                {
+                    label: '用户编号',
+                    prop: 'customerNo',
+                    align: 'center',
+                    sortable: true
+                },
+                {
+                    label: '用户姓名',
+                    prop: 'customerName',
+                    align: 'center'
+                },
+                {
+                    label: '用户地址',
+                    prop: 'customerAddress',
+                    align: 'left',
+                    sortable: true
+                },
+                {
+                    label: '联系电话',
+                    prop: 'customerPhone',
+                    align: 'center'
+                },
+                {
+                    label: '申请日期',
+                    prop: 'applyDatetime',
+                    align: 'center',
+                    sortable: true,
+                    formatter: function (row, column, value, index) {
+                        return DateHelper.formatterDate(value);
+                    }
+                },
+                {
+                    label: '建档日期',
+                    prop: 'createdDatetime',
+                    align: 'center',
+                    sortable: true,
+                    formatter: function (row, column, value, index) {
+                        return DateHelper.formatterDate(value);
+                    }
+                },
+                {
+                    label: '建档人员',
+                    prop: 'createdOname',
+                    align: 'center'
+                },
+                {
+                    label: '用户状态',
+                    prop: 'customerState',
+                    align: 'center',
+                    formatter: function (row, column, value, index) {
+                        if (value == '作废用户') {
+                            // return Object.assign({}, { 'background-color': '#CDCDCD', 'text-decoration': 'line-through' }, definedParams)
+                            return '<div><span class="el-tag el-tag--danger el-tag--light">' + value + '</span></div>'
+                        }
+                        return value;
+                    }
+                }
+            ],
+            dataList: [], // 表格数据
+            selectedRow: null, //表格选中行
+
+            /* ----- 详情页 ----- */
+            dialogTitle: '添加',
+            editState: false,//编辑状态,true:禁用;false:启用
+            dialogVisible: false,
+            detailData: {
+                //id: undefined,//编号
+                companyBranch: undefined,//所属公司
+                mrArea: undefined,//所属抄表片区
+                mrBook: undefined,//所属抄表本
+                customerNo: undefined,//用户编号
+                costomerAddr: undefined,//用户地址
+                customerName: undefined,//用户姓名
+                customerPhone: undefined,
+                applyName: undefined,//申请人员
+                phone: undefined,//电话
+                applyDate: undefined,//申请时间
+                meterThisReading: undefined,//水表止度
+                remark: undefined,//备注说明
+                yzqf: undefined,//验证欠费(1:验证;0:不验证)
+                hfysFlag: undefined,//恢复用水标志(默认为0,1是已恢复)
+                hfbtDate: undefined,//恢复销户时间
+                operatorOcode: undefined,//操作人员编码
+                operatorOname: undefined,//操作人员姓名
+                operatorDate: undefined//操作时间
+            }
+        }
+    },
+    watch: {
+        selectedRow(value) {
+            this.disabledModify = this.selectedRow == null;
+        },
+        dialogVisible(newVal, oldVal) {
+            if (!newVal) {
+                this.resetDetailData()
+            }
+        }
+    },
+    created() {
+
+    },
+    mounted() {
+        this.bindList();
+    },
+    methods: {
+        /* ----- 方法 ----- */
+        /**
+         * @description 绑定列表
+         */
+        bindList() {
+            // 追加分页参数
+            let params = Object.assign({}, this.pageInfo, this.queryParams);
+
+            this.dataList = []
+            this.selectedRow = null
+            Customer.query(params).then((res) => {
+                if (res.code !== 1) {
+                    this.$message.error('查询失败!')
+                    return
+                }
+                // 数据总数
+                this.pageInfo.tableTotal = res.result.total
+                this.dataList = res.result.records
+            }).catch((ex) => {
+                this.$message.error("查询失败!");
+            }).finally(() => {
+            });
+        },
+        resetDetailData() {
+            // 表单数据
+            for (var key in this.detailData) {
+                //console.log("key值:" + key)
+                this.detailData[key] = undefined
+            }
+        },
+        /**
+         * 保存方法
+         */
+        save() {
+            let params = Object.assign({}, this.detailData);
+            params.customerNo = this.selectedRow.customerNo;
+            params.companyBranch = this.selectedRow.companyBranch;
+            params.mrArea = this.selectedRow.mrArea;
+            params.mrBook = this.selectedRow.mrBook;
+
+            params.operatorOcode = this.$store.state.user.username;
+            params.operatorOname = this.$store.state.user.realName;
+            params.operatorDate = DateHelper.getNowFormatDate(true);
+
+            //console.log(JSON.stringify(params));
+            CustomerXh.save(params, { yzqf: this.detailData.yzqf }).then(res => {
+                if (res.code == 1) {
+                    this.bindList();
+                    this.$message.success("销户成功!");
+                    this.dialogVisible = false;
+                } else {
+                    this.$message.error(res);
+                }
+            }).catch((ex) => {
+                this.$message.error("销户失败!");
+            }).finally(() => {
+            });
+        },
+
+        /* ----- dom事件 ----- */
+        /**
+         * @description 查询
+         */
+        clickQuery() {
+            this.pageInfo.current = 1
+            this.bindList()
+        },
+        /**
+         * @description 销户
+         */
+        clickModify() {
+            if (this.selectedRow != null) {
+                if (this.selectedRow.customerState == '作废用户' || this.selectedRow.customerState == '销户用户') {
+                    this.$message({
+                        message: '作废用户、销户用户不能操作销户!',
+                        type: 'warning'
+                    });
+                    return;
+                }
+
+                this.detailData.customerNo = this.selectedRow.customerNo
+                this.detailData.customerName = this.selectedRow.customerName
+                this.detailData.customerPhone = this.selectedRow.customerPhone
+                this.detailData.costomerAddr = this.selectedRow.customerAddress
+                this.detailData.applyDate = DateHelper.getNowDateZeroTime();
+                this.detailData.yzqf = '1';
+                this.detailData.operatorOname = this.$store.state.user.realName
+                this.detailData.operatorDate = DateHelper.getNowFormatDate(true);
+
+                this.opType = 1;
+                this.dialogTitle = "销户";
+                this.editState = false;
+                this.dialogVisible = true;// 显示弹窗
+            }
+        },
+        /**
+         * 点击关闭(取消)
+         */
+        clickCancel() {
+            this.dialogVisible = false // 关闭弹窗
+        },
+        /**
+         * 点击确定(保存)
+         */
+        clickSave() {
+            let flag = this.$refs.dForm.validate();
+            if (flag) {
+                if (this.opType === 1) this.save();// 添加
+            }
+        },
+
+        /* ----- 组件事件 ----- */
+        /**
+         * @description 改变当前页
+         */
+        handleCurrentChange(current) {
+            this.pageInfo.current = current
+            this.bindList()
+        },
+        /**
+         * @description 分页每页条数
+         */
+        handleSizeChange(size) {
+            this.pageInfo.size = size
+            this.bindList()
+        },
+        /**
+         * @description 选择改变
+         */
+        handleRowClick(row) {
+            this.selectedRow = row
+        },
+        //排序事件
+        onCustomerSortChange(arrOrder) {
+            this.pageInfo['orders[0].asc'] = arrOrder[0];
+            this.pageInfo['orders[0].column'] = arrOrder[1];
+            this.bindList();
+        }
+    }
+}
+</script>
+  

+ 241 - 105
src/views/mis/feesManage/businessFees2-index.vue

@@ -1,15 +1,16 @@
 <template>
   <div class="mis-Box">
     <div class="header">
-      <cpscustomer @selValue="selValue" />
+      <cpscustomer @selValue="selValue" ref="fileInput" />
     </div>
     <el-container>
       <el-aside width="20%">
         <div class="content">
+
           <div class="ms">
             <el-descriptions :column="1" border size="medium" labelClassName="descLabel" contentClassName="descContent">
               <el-descriptions-item label="用户编号:" labelStyle="width:4%;font-weight:bold"
-                contentStyle="width:8%;font-weight:bold">
+                contentStyle="width:8%;font-weight:bold;font-color:red">
                 {{ customerModel.customerNo }}
               </el-descriptions-item>
 
@@ -20,22 +21,20 @@
                 {{ customerModel.mrBook }}
               </el-descriptions-item>
               <el-descriptions-item label="用水性质:" labelStyle="width:4%;" contentStyle="width:5%;">
-                3
+               {{customerModel.priceName}}
               </el-descriptions-item>
 
               <el-descriptions-item label="水表编号:" labelStyle="width:4%;" contentStyle="width:5%;">
                 {{ customerModel.meterNumber }}
               </el-descriptions-item>
-              <el-descriptions-item label="联系电话:" labelStyle="width:4%;" contentStyle="width:5%;">
-
-                {{ customerModel.customerPhone }}
-
+              <el-descriptions-item label="联系电话:" labelStyle="width:4%;" contentStyle="width:5%;"> 
+                {{ customerModel.customerPhone }} 
               </el-descriptions-item>
               <el-descriptions-item label="用户地址:">
                 {{ customerModel.customerAddr }}
               </el-descriptions-item>
               <el-descriptions-item label="票据类型:">
-                8
+                {{customerModel.invoiceType}}
               </el-descriptions-item>
               <el-descriptions-item label="水表类别:">
                 {{ customerModel.meterType }}
@@ -56,10 +55,18 @@
               <el-table-column prop="totalPrice" label="金额">
               </el-table-column>
             </el-table>
+          </div>
+          <div>
 
+            <el-divider><i class="el-icon-mobile-phone"></i>辅助信息</el-divider>
+            <el-row type="flex" class="row-bg" style="width:100%">
+              <el-col :span="12">上笔金额</el-col>
+              <el-col :span="12">{{ lastChargeMoney }} 元</el-col>
+            </el-row>
           </div>
-          <el-divider><i class="el-icon-mobile-phone"></i>今日统计</el-divider>
-          <div style="background-color:red">
+          <!-- <el-divider><i class="el-icon-mobile-phone"></i>今日(实收)统计</el-divider> --> 
+
+          <!-- <div style="background-color:red">
             <el-table :data="feesData" style="width: 100%">
               <el-table-column prop="chargeType" label="方式">
               </el-table-column>
@@ -67,9 +74,9 @@
               </el-table-column>
               <el-table-column prop="totalPrice" label="金额">
               </el-table-column>
-            </el-table>
+            </el-table> 
+          </div>   -->
 
-          </div>
         </div>
 
       </el-aside>
@@ -125,15 +132,16 @@
               </el-col>
               <el-col :span="6" type="flex" align="middle">
                 <div class="grid-content bg-purple">实收金额:<el-input v-model="feesModel.chargeAcc" size="small"
-                  :disabled="true"  style="width:50%"  placeholder="实收金额"></el-input>元</div>
+                    :disabled="true" style="width:50%" placeholder="实收金额"></el-input>元</div>
               </el-col>
 
               <el-col :span="6" type="flex" align="middle">
                 <div class="grid-content bg-purple">
-                  <el-button    type="warning" v-model="btnCharge" round :style="{ display: this.btnChagreVisable == true ? 'none' : '' }"
-                  ref="tableHeadFilterBtn"  @click="onCharge">收费</el-button>
+                  <el-button type="warning" v-model="btnCharge" round
+                    :style="{ display: this.btnChagreVisable == true ? 'none' : '' }" ref="tableHeadFilterBtn"
+                    @click="onCharge">收费</el-button>
                   <el-button type="warning" round :style="{ display: this.btnYFFChagreVisable == true ? 'none' : '' }"
-                    @click="onAdvPayment">预存</el-button>
+                    ref="tableHeadFilterYcBtn" @click="onAdvPayment">预存</el-button>
 
                 </div>
               </el-col>
@@ -150,12 +158,22 @@
               <div class="grid-content bg-purple">累计金额:</div>
             </el-col> -->
               <el-col :span="6" type="flex" align="middle">
-                <div class="grid-content bg-purple">付费方式:<el-input v-model="feesModel.fffs" size="small" style="width:50%"
-                    placeholder="付费方式"></el-input>元</div>
+                <div class="grid-content bg-purple">
+                  
+                  付费方式: 
+                    <el-select v-model="selectFffsValue" placeholder="请选择打印方式" size="small" style="width:60%"> 
+                        <el-option v-for="item in feesModel.fffs" :key="item.code" :label="item.name" :value="item.code">
+                        </el-option>
+                    </el-select>
+
+                    
+                
+                  </div>
               </el-col>
               <el-col :span="6" type="flex" align="middle">
                 <div class="grid-content bg-purple">本次收款:<el-input v-model="feesModel.payTotalAmount" size="small"
-                  ref="tableHeadFilterInput"    style="width:50%" placeholder="本次收款:" @keyup.enter.native="onInputEnterKeyDown" @blur="onInputBlur"></el-input>元</div>
+                    ref="tableHeadFilterInput" style="width:50%" placeholder="本次收款:"
+                    @keyup.enter.native="onInputEnterKeyDown"></el-input>元</div>
               </el-col>
               <el-col :span="6" type="flex" align="middle">
                 <div class="grid-content bg-purple"> <el-button type="primary" round>预览</el-button>
@@ -168,10 +186,17 @@
                   <el-switch v-model="isLtqz" active-text="零头取整" inactive-text="零头实缴" @change="onSwitchChange">
                   </el-switch>
 
-                  <el-select v-model="value" placeholder="请选择打印方式">
-                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                  <el-select v-model="printType" placeholder="请选择打印方式">
+                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"
+                      :disabled="item.disabled">
                     </el-option>
                   </el-select>
+
+
+                  <!-- <el-select   placeholder="请选择打印方式">
+                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                  </el-select> -->
                 </div>
               </el-col>
             </el-row>
@@ -194,6 +219,8 @@ import cpscustomer from '../common/components/cps-customer'
 import { Customer } from '@/views/mis/common/api/customerManagement.js'
 import { feesApi } from '@/views/mis/common/api/feesApi.js'
 import { NumberHelper, StringHelper } from '@/views/mis/common/assets/scripts/utils.js'
+import { PayMode } from '@/views/mis/common/api/codingManagement.js'
+
 export default ({
   name: "businessFees2",
   components: { cpscustomer, TableItem },
@@ -201,13 +228,16 @@ export default ({
     return {
       btnChagreVisable: false,
       btnYFFChagreVisable: true,
-      btnCharge:'',
-      isQf:false,
+      btnCharge: '',
+      lastChargeMoney: 0,
+      isQf: false,
       size: '',
       isLtqz: true,
       activeName: 'first',
-      feesModel: { rec: 0, userAcc: 0, chargeAcc: 0, thisBlance: 0, fffs: 0, payTotalAmount: 0 },
+      selectFffsValue:'',
+      feesModel: { rec: 0.00, userAcc: 0.00, chargeAcc: 0.00, thisBlance: 0.00, fffs: [], payTotalAmount: 0.00 },
       selectData: [],
+      printType: '',
       options: [{
         value: 'no',
         label: '无'
@@ -227,6 +257,7 @@ export default ({
         customerName: '',
         customerPhone: '',
         customerFcc: 0,
+        priceName:"",
         meterType: '',
         money: '',
         remark: '',
@@ -234,6 +265,7 @@ export default ({
         mrBook: '',
         lastReading: '',
         meterNumber: '',
+        invoiceType:'无'
       },
       pageInfo: { current: 1, size: 10, tableTotal: 0 },
       feesData: [{
@@ -354,22 +386,28 @@ export default ({
           align: 'center'
         }
         ,
+        {
+          label: '实收金额',
+          prop: 'payTotalAmount',
+          align: 'center'
+        }
+        ,
+        {
+          label: '收费日期',
+          prop: 'chargeDate',
+          align: 'center'
+        }
+        ,
         {
           label: '违约金',
           prop: 'znj',
           align: 'center'
         }
-
         ,
         {
           label: '抄表日期',
           prop: 'cbrq',
           align: 'center'
-        },
-        {
-          label: '实收金额',
-          prop: 'payTotalAmount',
-          align: 'center'
         }
         ,
         {
@@ -392,15 +430,39 @@ export default ({
       }
     };
   },
-  mounted(){
+  mounted() {
+    this.$refs.fileInput.onFileInputFocus()
     //this.feesModel.payTotalAmount.focus()
 
-      // this.$nextTick(() => { 
-        //this.$refs.tableHeadFilterInp.select() 
-      // })
+    // this.$nextTick(() => { 
+    //this.$refs.tableHeadFilterInp.select() 
+    // })
+    PayMode.query({}).then((res)=>{
+      if(res.code==1){
+        this.feesModel.fffs=res.result.records
+        this.selectFffsValue=this.feesModel.fffs[0].code
+        //alert(JSON.stringify(this.feesModel.fffs))
+      } 
+    }).catch((e)=>{
+
+    })
 
     this.onLoadToDayChargeInfo()
   },
+  watch: {
+    'feesModel.payTotalAmount'(newvalue, oldvalue) {
+      this.feesModel.thisBlance = NumberHelper.accSub(newvalue, this.feesModel.chargeAcc).toFixed(2)
+    },
+    'customerModel.customerNo'(newvalue, oldvalue) {
+
+    }
+    // feesModel:{
+    //    handler(newfeesModel,oldfeesModel){
+    //     alert("改变前的值"+JSON.stringify(oldfeesModel) +",改变后的值"+JSON.stringify(newfeesModel))
+    //    },
+    //    deep:true
+    // }
+  },
   methods: {
     handleSelectionChange(rows) {
       this.selectionsData = rows
@@ -411,8 +473,9 @@ export default ({
      * 查询用户公用组件
      * @param {value} value 
      */
-    selValue(objs) {
-
+    selValue(objs, isresfushfocus = true) {
+      // alert(isresfushfocus) 
+      this.isQf = false
       this.customerModel.customerNo = objs.customerNo
       this.customerModel.customerAddr = objs.customerAddress
       this.customerModel.customerPhone = objs.customerPhone
@@ -421,13 +484,16 @@ export default ({
       this.customerModel.mrBook = objs.mrBook
       this.customerModel.lastReading = objs.lastReading
       this.customerModel.meterNumber = objs.meterNumber
+      this.customerModel.priceName = objs.priceName
+      this.customerModel.meterType = objs.meterTypeName
+
       /**
        * @description 查询用户信息及余额信息
        */
       Customer.queryCusTomerAcc({ customerNo: this.customerModel.customerNo }).then((res) => {
         if (res.code == 1) {
-          this.feesModel.userAcc = res.result.nbBalanceAmount
-          this.customerModel.meterType = res.result.meterType
+          this.feesModel.userAcc = res.result.nbBalanceAmount.toFixed(2)
+         // this.customerModel.meterType = res.result.meterType
         }
 
       }).catch((ex) => {
@@ -442,37 +508,44 @@ export default ({
         if (res.result.total > 0) {
           this.tableData = res.result.records
           this.$refs.listRec.setToggleAllSelection() //触发选中会自动调用calc
-          this.isQf=true
+          this.isQf = true
 
         } else {
           this.tableData = []
-          this.calcAmount() //计算
+          this.calcAmount(isresfushfocus) //计算
         }
 
       }).catch((ex) => {
         this.$message.error("查询欠费信息失败!")
       })
+
       //加载实收明细
       this.onLoadChargeList()
 
+      //    //设置焦点
+      // this.$nextTick(() => {
+      //   this.$refs.tableHeadFilterInput.focus()
+      //   this.$refs.tableHeadFilterInput.select()
+      // })
+
     },
     /**
      *@description 计算欠费余额
      * */
-    calcAmount() {
+    calcAmount(isresfushfocus = true) {
 
       let number = 0.00
       /**
        * @description 计算应收金额
       */
-     //  debugger;
-      if (this.selectionsData != null && typeof (this.selectionsData) !== '[]'&& this.selectionsData.length>0) {
+      //  debugger;
+      if (this.selectionsData != null && typeof (this.selectionsData) !== '[]' && this.selectionsData.length > 0) {
         this.selectionsData.forEach((item) => {
           number = NumberHelper.accAdd(number, item.recAmount)
-        }); 
-        this.feesModel.rec = number
-      } else { 
-        this.feesModel.rec = number
+        })
+        this.feesModel.rec = number.toFixed(2)
+      } else {
+        this.feesModel.rec = number.toFixed(2)
       }
 
 
@@ -486,30 +559,39 @@ export default ({
       } else {
         this.btnYFFChagreVisable = false
         this.btnChagreVisable = true
+        this.feesModel.chargeAcc = (0.00).toFixed(2)
       }
 
       var isRounding = this.isLtqz
       if (isRounding) {
         //零头取整 
         var payTotalAmountaccMathCeil = Math.ceil(this.feesModel.chargeAcc)
-        this.feesModel.payTotalAmount = payTotalAmountaccMathCeil
-        this.feesModel.thisBlance = NumberHelper.accSub(payTotalAmountaccMathCeil, this.feesModel.chargeAcc).toFixed(2)
+        this.feesModel.payTotalAmount = payTotalAmountaccMathCeil.toFixed(2)
 
+        if (payTotalAmountaccMathCeil > 0) {
+          this.feesModel.thisBlance = NumberHelper.accSub(payTotalAmountaccMathCeil, this.feesModel.chargeAcc).toFixed(2)
+        } else {
+          this.feesModel.thisBlance = 0.00
+        }
       } else {
         //零头实缴
-        this.feesModel.payTotalAmount = this.feesModel.chargeAcc
-        this.feesModel.thisBlance = 0
+        this.feesModel.payTotalAmount = this.feesModel.chargeAcc.toFixed(2)
+        this.feesModel.thisBlance = 0.00
       }
-     
+
       //加载当日收费信息
       this.onLoadToDayChargeInfo()
 
-      //设置焦点
-      this.$nextTick(() => {  
-        this.$refs.tableHeadFilterInput.focus()
-        this.$refs.tableHeadFilterInput.select()
-      })
-
+      if (isresfushfocus) {
+        this.$nextTick(() => {
+          this.$refs.tableHeadFilterInput.focus()
+          this.$refs.tableHeadFilterInput.select()
+        })
+      }else{
+        this.$nextTick(() => {
+          this.$refs.fileInput.onFileInputFocusAndSelect()
+        })
+      }
 
     },
     /**
@@ -519,14 +601,23 @@ export default ({
     onSwitchChange() {
       this.calcAmount()
     },
-    onInputEnterKeyDown(){ 
-      this.$refs.tableHeadFilterBtn.$el.focus() 
+    onInputEnterKeyDown() {
+      if (!this.btnChagreVisable) {
+       // this.$refs.tableHeadFilterBtn.$el.focus() 
+       //this.onPayment()
+      }
+
+      if (!this.btnYFFChagreVisable) { 
+        this.$refs.tableHeadFilterYcBtn.$el.focus() 
+       // this.onAdvPayment()
+        //
+      }
 
     },
-    /**
+ /**
  *  @description 移除实收焦点
  */
-    onInputBlur() { 
+    onInputBlur() {
 
       // if (!(parseFloat(this.feesModel.payTotalAmount) > 0)) {
       //   this.$message.error("异常:实收金额应大于0元");
@@ -547,7 +638,7 @@ export default ({
       //   this.feesModel.payTotalAmount = 0
       //   this.$message.error("实收金额异常,请重新输入")
       // }
-    
+      // this.calcAmount()
 
     },
     /**
@@ -583,6 +674,8 @@ export default ({
             this.tableChargeData = []
           }
 
+           
+
         }).catch((ex) => {
           this.$message.error("查询欠费信息失败!")
         })
@@ -610,7 +703,42 @@ export default ({
       * @description 执行收费按钮
      */
     , onCharge() {
-      alert("收取欠费")
+
+      let ids = '';
+      if (this.selectionsData != null && typeof (this.selectionsData) !== '[]' && this.selectionsData.length > 0) {
+        let arr = []
+        this.selectionsData.forEach((item) => {
+          arr.push(item.id);
+        })
+        if (arr.length > 0) {
+          ids = arr.join(",")
+        }
+
+      } else {
+        this.$alert('请勾选欠费信息。', { type: "error" })
+        return
+      }
+
+      if (ids != '') {
+        feesApi.chargePayment({ data: { "V_FFFS": this.selectFffsValue, "V_SFRYBM": "admin", "V_SFRYXM": "admin", "V_SSJE": this.feesModel.payTotalAmount, "V_YHBH": this.customerModel.customerNo, "V_IDS": ids } }).then((res) => {
+          if (res.code == 1) {
+            this.$alert('欠费收取成功', {
+              type: "success", callback: action => {
+                //重新用户欠费信息及用户余额信息
+                this.selValue(this.customerModel, false)
+                this.lastChargeMoney = this.feesModel.payTotalAmount
+                //调用组件focus方法
+                
+              }
+            })
+          } else {
+            this.$alert('欠费收取失败', { type: "error" })
+          }
+        }).catch((ex) => {
+          this.$message.error("欠费收取操作异常!")
+        })
+      }
+
     }
     /**
      * @description 预付费按钮
@@ -627,26 +755,29 @@ export default ({
         return
       }
 
-      let msg = StringHelper.stringFormat('请确认⌈{0}⌋用户,预存【{1}】元?', [this.customerModel.customerNo, this.feesModel.payTotalAmount])
+      let msg = StringHelper.stringFormat('请再次确认⌈{0}⌋用户,预存【{1}】元?', [this.customerModel.customerNo, this.feesModel.payTotalAmount])
       this.$confirm(msg, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        //调用
-        feesApi.chargeOnAdvPayment({ data: { "inFFFS": this.feesModel.fffs, "inSFRYBM": "admin", "inSFRYXM": "admin", "inSSJE": this.feesModel.payTotalAmount, "inYhbh": this.customerModel.customerNo } }).then((res) => {
+        //调用
+        feesApi.chargeOnAdvPayment({ data: { "inFFFS": this.selectFffsValue, "inSFRYBM": "admin", "inSFRYXM": "admin", "inSSJE": this.feesModel.payTotalAmount, "inYhbh": this.customerModel.customerNo } }).then((res) => {
           if (res.code == 1) {
             this.$alert('预存成功', {
               type: "success", callback: action => {
-                //重新用户欠费信息及用户余额信息
-                this.selValue(this.customerModel)
+                //刷新用户欠费信息及用户余额信息
+                // debugger
+                this.selValue(this.customerModel, false)
+                this.lastChargeMoney = this.feesModel.payTotalAmount
+                //调用组件focus方法 
               }
             })
           } else {
-            this.$alert('预存成功', { type: "error" })
+            this.$alert('预存失败', { type: "error" })
           }
         }).catch((ex) => {
-          this.$message.error("查询欠费信息失败!")
+          this.$message.error("预存操作异常!")
         })
 
       }).catch(() => {
@@ -729,38 +860,43 @@ export default ({
 }
 </style>
 
-<style scoped>
-.el-row {
-  margin-top: 5px;
-
-  &:last-child {
-    margin-bottom: 0;
-  }
-}
-
-.el-col {
-  border-radius: 4px;
-}
-
-.bg-purple {
-  display: table-cell;
-  vertical-align: middle;
-}
-
-.grid-content {
-  padding: 5px;
-  border-radius: 4px;
-  min-height: 36px;
-  font-size: 16px;
-  text-align: center;
-  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
-  width: 100%;
-  line-height: 30px;
-
-}
-
-.row-bg {
-  padding: 10px 0;
-  background-color: #f9fafc;
-}
+<style scoped> .el-divider {
+   margin: 12px 0;
+   background: 0 0;
+   border-top: 1px solid #E6EBF5;
+ }
+
+ .el-row {
+   margin-top: 5px;
+
+   &:last-child {
+     margin-bottom: 0;
+   }
+ }
+
+ .el-col {
+   border-radius: 4px;
+ }
+
+ .bg-purple {
+   display: table-cell;
+   vertical-align: middle;
+ }
+
+ .grid-content {
+   padding: 5px;
+   border-radius: 4px;
+   min-height: 36px;
+   font-size: 16px;
+   text-align: center;
+   font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
+   width: 100%;
+   line-height: 30px;
+
+ }
+
+ .row-bg {
+   padding: 10px 0;
+   background-color: #f9fafc;
+ }
 </style>