Browse Source

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

shudong 1 year ago
parent
commit
57ccc941d9

+ 1 - 0
src/router/_import.js

@@ -253,6 +253,7 @@ const map = {
   customerRelationship: () => import('@/views/mis/customerManagement/customerRelationship-index'), // 用户管理-用户抄收关系
   customerGh: () => import('@/views/mis/customerManagement/customerGh-index'), // 用户管理-更名过户处理
   customerBt: () => import('@/views/mis/customerManagement/customerBt-index'), // 用户管理-用户报停处理
+  customerHfys: () => import('@/views/mis/customerManagement/customerHfys-index'), // 用户管理-恢复用水处理
   customerXh: () => import('@/views/mis/customerManagement/customerXh-index'), // 用户管理-用户销户处理
   priceList: () => import('@/views/mis/financialManage/priceManage/priceList'), // 水价管理   
   meterInfo: () => import('@/views/mis/meterManage/meterInfo/meter-index'), // 水表档案

+ 15 - 1
src/views/mis/common/api/customerManagement.js

@@ -192,4 +192,18 @@ const CustomerXh = {
     }
 }
 
-export { Customer, CustomerBatch, BwMeterZfb, CustomerFfgx, CustomerGh, CustomerBt, CustomerXh };
+/**
+ * @description 恢复用水处理
+ */
+const CustomerHfys = {
+    save(requestParams, otherParams) {
+        return request({
+            url: '/fees/api/userprofilemgt/dahfyslog',
+            method: 'post',
+            data: requestParams,
+            params: otherParams
+        })
+    }
+}
+
+export { Customer, CustomerBatch, BwMeterZfb, CustomerFfgx, CustomerGh, CustomerBt, CustomerXh, CustomerHfys };

+ 1 - 0
src/views/mis/customerManagement/customer-index.vue

@@ -458,6 +458,7 @@ export default {
                 }
             }
 
+            console.log(JSON.stringify(params));
             Customer.cmdCustomerAndMeter(params, { operationType: this.operationType }).then(res => {
                 if (res.code == 1) {
                     this.bindList();

+ 1 - 1
src/views/mis/customerManagement/customerBt-form.vue

@@ -21,7 +21,7 @@
         </el-form-item>
       </el-descriptions-item>
       <el-descriptions-item label="联系电话">
-        <el-form-item prop="customerAddress">
+        <el-form-item prop="customerPhone">
           <el-input v-model="detailData.customerPhone" placeholder="请输入" maxlength="100" clearable readonly></el-input>
         </el-form-item>
       </el-descriptions-item>

+ 126 - 0
src/views/mis/customerManagement/customerHfys-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="customerAddr">
+          <el-input v-model="detailData.customerAddr" 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="customerPhone">
+          <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>
+
+      </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"] }
+        ]
+      }
+    }
+  },
+  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/customerHfys-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, CustomerHfys } 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 './customerHfys-form.vue'
+export default {
+    components: { cpsLinkageArea, tfTable, tfDetail },
+    props: ['data'],
+    data() {
+        return {
+            /* ----- 主页 ----- */
+            queryParams: {
+                companyBranch: undefined,//公司
+                mrArea: undefined,//片区
+                mrBook: undefined,//抄表本
+                searchText: undefined,//模糊查询
+
+                customerState: '2'//用户状态
+            },
+            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,//用户编号
+                customerAddr: undefined,//用户地址
+                customerName: undefined,//用户姓名
+                customerPhone: undefined,
+                applyName: undefined,//申请人姓名
+                phone: undefined,//申请人电话
+                applyDate: undefined,//申请时间
+                remark: undefined,//备注说明
+                yzqf: undefined,//验证欠费(1:验证;0:不验证)
+                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));
+            CustomerHfys.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.customerAddr = 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>
+  

+ 1 - 1
src/views/mis/customerManagement/customerXh-form.vue

@@ -21,7 +21,7 @@
         </el-form-item>
       </el-descriptions-item>
       <el-descriptions-item label="联系电话">
-        <el-form-item prop="customerAddress">
+        <el-form-item prop="customerPhone">
           <el-input v-model="detailData.customerPhone" placeholder="请输入" maxlength="100" clearable readonly></el-input>
         </el-form-item>
       </el-descriptions-item>