Browse Source

用户档案管理功能优化

jonbo 1 day ago
parent
commit
8805930c17

+ 5 - 5
src/views/mis/common/api/codingManagement.js

@@ -263,7 +263,7 @@ const MrBook = {
 /**
  * @description 小区管理
  */
-const Community={
+const Community = {
     query(requestParams) {
         return request({
             url: '',
@@ -430,9 +430,9 @@ const CodingCustom = {
         cblx: { instance: null, tableName: 'bm_cblx' },//抄表类型
         cwrq: { instance: null, tableName: 'sys_gdcsb', labelF: "cwrq", valueF: "cwrq" },//财务日期
         yslx: { instance: null, tableName: 'bm_yslx' },//用水类型
-        sqfs:{instacnce:null,tableName:'bm_znjsq'},//违约金收取方式
-        cljg:{instacnce:null,tableName:'bm_cljg'},//处理结果
-        fplx:{ instance: null, tableName: '', data: [{ code: '0', name: '普票' }, { code: '1', name: '专票' }, { code: '2', name: '手册' }, { code: '3', name: '未知' }] },//发票类型
+        sqfs: { instacnce: null, tableName: 'bm_znjsq' },//违约金收取方式
+        cljg: { instacnce: null, tableName: 'bm_cljg' },//处理结果
+        fplx: { instance: null, tableName: '', data: [{ code: '0', name: '普票' }, { code: '1', name: '专票' }, { code: '2', name: '手册' }, { code: '3', name: '未知' }] },//发票类型
     },
     query(requestParams) {
         return request({
@@ -443,4 +443,4 @@ const CodingCustom = {
     }
 }
 
-export { ChargeChannel, MeterType, MeterFactory, MeterModel, PayMode, MrArea, MrBook, UniversalCodeP, UniversalCode, CodingCustom,Community };
+export { ChargeChannel, MeterType, MeterFactory, MeterModel, PayMode, MrArea, MrBook, UniversalCodeP, UniversalCode, CodingCustom, Community };

+ 13 - 8
src/views/mis/customerManagement/customer-form.vue

@@ -76,7 +76,8 @@
 
           <el-descriptions-item label="付费方式" labelClassName="redStar">
             <el-form-item prop="yhKhjbxx.fffs">
-              <cpsSelect v-model="detailData.yhKhjbxx.fffs" placeholder="请选择" skey="fffs" :params="{ yh_isdisabled: 1 }">
+              <cpsSelect v-model="detailData.yhKhjbxx.fffs" placeholder="请选择" skey="fffs" isDisabled="all"
+                :params="{ yh_isdisabled: 1 }">
               </cpsSelect>
             </el-form-item>
           </el-descriptions-item>
@@ -198,18 +199,22 @@
 
           <el-descriptions-item label="收垃圾费" labelClassName="redStar">
             <el-switch v-model="detailData.yhCbkxx.ljfbz" active-text="需收取" inactive-text="不收取" active-value="1"
-              inactive-value="0" inactive-color="lightgray" @change="(value) =>
+              inactive-value="0" inactive-color="lightgray" @change="(value) => {
                 changeRequiredValidate1(value, '1', [
-                  'yhCbkxx.ljffs',
-                  'yhCbkxx.ljfje',
-                ])
-                ">
+                  'yhCbkxx.ljffs'
+                ]);
+
+                changeRequiredValidate1(detailData.yhCbkxx.ljffs, '0', ['yhCbkxx.ljfje']);
+              }">
             </el-switch>
           </el-descriptions-item>
           <el-descriptions-item label="收取方式">
             <el-form-item prop="yhCbkxx.ljffs">
               <cpsSelect v-model="detailData.yhCbkxx.ljffs" placeholder="请选择" skey="ljfsqfs"
-                :disabled="detailData.yhCbkxx.ljfbz != 1">
+                :disabled="detailData.yhCbkxx.ljfbz != 1" @change="(value) => {
+                  changeRequiredValidate1(value, '0', ['yhCbkxx.ljfje']);
+                  if (value == 1 && (detailData.yhCbkxx.ljfje == undefined || detailData.yhCbkxx.ljfje === '')) detailData.yhCbkxx.ljfje = 0.00;
+                }">
               </cpsSelect>
             </el-form-item>
           </el-descriptions-item>
@@ -217,7 +222,7 @@
             <el-form-item prop="yhCbkxx.ljfje">
               <el-input-number v-model="detailData.yhCbkxx.ljfje" placeholder="请输入" controls-position="right" :min="0"
                 :max="10" :precision="2" :step="0.1" style="width: 100%"
-                :disabled="detailData.yhCbkxx.ljfbz != 1"></el-input-number>
+                :disabled="!(detailData.yhCbkxx.ljfbz == 1 && detailData.yhCbkxx.ljffs == 0)"></el-input-number>
             </el-form-item>
           </el-descriptions-item>
 

+ 15 - 12
src/views/mis/customerManagement/customer-index.vue

@@ -84,8 +84,7 @@
                   </cpsSelect>&nbsp; 所属表册:<cpsSelect v-model="queryParams.sscbb" size="small" skey="cbb" :params="{
                     ssgs: queryParams.ssgs,
                     sscbpq: queryParams.sscbpq,
-                  }" isDisabled="all" :refresh="cbbRefresh" :labelGroup="true" :filterable="true"
-                    style="width: 180px">
+                  }" isDisabled="all" :refresh="cbbRefresh" :labelGroup="true" :filterable="true" style="width: 180px">
                   </cpsSelect>&nbsp;
                 </div>
                 <div style="margin: 5px">
@@ -105,14 +104,14 @@
                   建档日期:<el-date-picker v-model="dprJdrq" type="daterange" align="right" unlink-panels range-separator="至"
                     start-placeholder="建档开始日期" end-placeholder="建档结束日期" value-format="yyyy-MM-dd"
                     :picker-options="pickerOptions" size="small" style="width: 438px" @change="() => {
-                        if (this.dprJdrq && this.dprJdrq.length > 0) {
-                          this.queryParams.jdrqStart = this.dprJdrq[0];
-                          this.queryParams.jdrqEnd = this.dprJdrq[1];
-                        } else {
-                          this.queryParams.jdrqStart = undefined;
-                          this.queryParams.jdrqEnd = undefined;
-                        }
+                      if (this.dprJdrq && this.dprJdrq.length > 0) {
+                        this.queryParams.jdrqStart = this.dprJdrq[0];
+                        this.queryParams.jdrqEnd = this.dprJdrq[1];
+                      } else {
+                        this.queryParams.jdrqStart = undefined;
+                        this.queryParams.jdrqEnd = undefined;
                       }
+                    }
                       ">
                   </el-date-picker>
                 </div>
@@ -144,9 +143,9 @@
         </el-main>
         <el-footer style="text-align: right; padding-top: 8px">
           <el-button type="warning" icon="el-icon-check" @click="() => {
-              this.pageInfo.current = 1;
-              this.bindList(true);
-            }
+            this.pageInfo.current = 1;
+            this.bindList(true);
+          }
             ">确 定</el-button>
           <el-button type="warning" icon="el-icon-close" @click="$refs.drawer.closeDrawer()">关 闭</el-button>
         </el-footer>
@@ -468,7 +467,11 @@ export default {
       if (params.yhCbkxx.ljfbz == "0") {
         params.yhCbkxx.ljffs = "";
         params.yhCbkxx.ljfje = 0.0;
+      } else {
+        // 按量收取
+        if (params.yhCbkxx.ljffs == "1") params.yhCbkxx.ljfje = 0.0;
       }
+
       if (params.yhCbkxx.kkbz == "0") {
         params.yhCbkxx.ickid = undefined;
         params.yhCbkxx.kkrq = undefined;

+ 48 - 179
src/views/mis/customerManagement/customerRelationship-index.vue

@@ -7,74 +7,26 @@
           <el-divider />
           <div class="content-body" style="height: calc(100% - 42px)">
             <div style="height: 40px; display: flex; align-items: center">
-              所属公司:<cpsCompany
-                v-model="queryParams.ssgs"
-                size="small"
-                style="width: 150px"
-                @change="changeGs"
-              >
-              </cpsCompany
-              >&nbsp; 所属片区:<cpsSelect
-                v-model="queryParams.sscbpq"
-                size="small"
-                skey="cbpq"
-                :params="{ ssgs: queryParams.ssgs }"
-                isDisabled="all"
-                :refresh="cbpqRefresh"
-                @change="changeCbpq"
-                style="width: 150px"
-              >
+              所属公司:<cpsCompany v-model="queryParams.ssgs" size="small" style="width: 150px" @change="changeGs">
+              </cpsCompany>&nbsp; 所属片区:<cpsSelect v-model="queryParams.sscbpq" size="small" skey="cbpq"
+                :params="{ ssgs: queryParams.ssgs }" isDisabled="all" :refresh="cbpqRefresh" @change="changeCbpq"
+                style="width: 150px">
               </cpsSelect>
             </div>
             <div style="height: 46px; display: flex; align-items: center">
-              所属表册:<cpsSelect
-                v-model="queryParams.sscbb"
-                size="small"
-                skey="cbb"
-                :params="{ ssgs: queryParams.ssgs, sscbpq: queryParams.sscbpq }"
-                isDisabled="all"
-                :refresh="cbbRefresh"
-                :labelGroup="true"
-                :filterable="true"
-                style="width: 150px"
-              >
-              </cpsSelect
-              >&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
-              >
+              所属表册:<cpsSelect v-model="queryParams.sscbb" size="small" skey="cbb"
+                :params="{ ssgs: queryParams.ssgs, sscbpq: queryParams.sscbpq }" isDisabled="all" :refresh="cbbRefresh"
+                :labelGroup="true" :filterable="true" style="width: 150px">
+              </cpsSelect>&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>
             <div style="height: calc(100% - 86px); border: 1px solid #dcdfe6">
-              <tfTable
-                :table-data="dataList"
-                :column="columns"
-                :for-id="false"
-                :pagination="true"
-                :currentpage="pageInfo.current"
-                :pagesize="pageInfo.size"
-                :total="pageInfo.tableTotal"
-                :border="true"
-                :multiple="true"
-                :fixed="true"
-                :isdelete="false"
-                :is-select="false"
-                :stripe="true"
-                @handleCurrentChange="handleCurrentChange"
-                @handleSizeChange="handleSizeChange"
-                @handleSelectionChange="handleSelectionChange"
-                @sortChange="onCustomerSortChange"
-              />
+              <tfTable :table-data="dataList" :column="columns" :for-id="false" :pagination="true"
+                :currentpage="pageInfo.current" :pagesize="pageInfo.size" :total="pageInfo.tableTotal" :border="true"
+                :multiple="true" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
+                @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
+                @handleSelectionChange="handleSelectionChange" @sortChange="onCustomerSortChange" />
             </div>
           </div>
         </div>
@@ -84,141 +36,58 @@
           <div class="content-title">抄收关系设置</div>
           <el-divider />
           <div class="content-body" style="height: calc(100% - 42px)">
-            <el-tabs
-              v-model="activeName"
-              type="card"
-              @tab-click="tabs_handleClick"
-            >
+            <el-tabs v-model="activeName" type="card" @tab-click="tabs_handleClick">
               <el-tab-pane label="总分表关系" name="first">
                 <div style="height: 45px; display: flex; align-items: center">
                   <el-row style="flex: 1">
                     <el-col :span="16" style="text-align: right">
-                      <span class="mis-highlightFont"
-                        ><label>[总表]</label></span
-                      >用户编号:<el-input
-                        v-model="yhbhZb"
-                        size="small"
-                        style="width: 200px"
-                        placeholder="输入用户编号"
-                        clearable
-                        class="mis-highlightFont"
-                        @change="clickQuery_zfb()"
-                      >
-                        <el-button
-                          slot="append"
-                          size="small"
-                          icon="el-icon-search"
-                          @click="clickQuery_zfb()"
-                        ></el-button>
+                      <span class="mis-highlightFont"><label>[总表]</label></span>用户编号:<el-input v-model="yhbhZb"
+                        size="small" style="width: 200px" placeholder="输入用户编号" clearable class="mis-highlightFont"
+                        @change="clickQuery_zfb()">
+                        <el-button slot="append" size="small" icon="el-icon-search" @click="clickQuery_zfb()"></el-button>
                       </el-input>
                     </el-col>
                     <el-col :span="8" class="list-opCol">
-                      <el-button
-                        type="primary"
-                        size="small"
-                        icon="el-icon-plus"
-                        @click="clickAdd_zfb()"
-                        >绑定</el-button
-                      >
-                      <el-button
-                        type="danger"
-                        size="small"
-                        icon="el-icon-delete"
-                        @click="clickDelete_zfb()"
-                        >移除</el-button
-                      >
+                      <el-button type="primary" size="small" icon="el-icon-plus" @click="clickAdd_zfb()">绑定</el-button>
+                      <el-button type="danger" size="small" icon="el-icon-delete"
+                        @click="clickDelete_zfb()">移除</el-button>
                     </el-col>
                   </el-row>
                 </div>
-                <div
-                  style="height: calc(100% - 45px); border: 1px solid #dcdfe6"
-                >
-                  <tfTable
-                    :table-data="dataList_zfb"
-                    :column="columns_zfb"
-                    :for-id="false"
-                    :pagination="true"
-                    :currentpage="pageInfo_zfb.current"
-                    :pagesize="pageInfo_zfb.size"
-                    :total="pageInfo_zfb.tableTotal"
-                    :border="true"
-                    :multiple="true"
-                    :fixed="true"
-                    :isdelete="false"
-                    :is-select="false"
-                    :stripe="true"
-                    @handleCurrentChange="handleCurrentChange_zfb"
-                    @handleSizeChange="handleSizeChange_zfb"
-                    @handleSelectionChange="handleSelectionChange_zfb"
-                    @sortChange="onCustomerSortChange_zfb"
-                    @rowClick="handleRowClick_zfb"
-                  />
+                <div style="height: calc(100% - 45px); border: 1px solid #dcdfe6">
+                  <tfTable :table-data="dataList_zfb" :column="columns_zfb" :for-id="false" :pagination="true"
+                    :currentpage="pageInfo_zfb.current" :pagesize="pageInfo_zfb.size" :total="pageInfo_zfb.tableTotal"
+                    :border="true" :multiple="true" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
+                    @handleCurrentChange="handleCurrentChange_zfb" @handleSizeChange="handleSizeChange_zfb"
+                    @handleSelectionChange="handleSelectionChange_zfb" @sortChange="onCustomerSortChange_zfb"
+                    @rowClick="handleRowClick_zfb" />
                 </div>
               </el-tab-pane>
               <el-tab-pane label="付费关系" name="second">
                 <div style="height: 45px; display: flex; align-items: center">
                   <el-row style="flex: 1">
                     <el-col :span="16" style="text-align: right">
-                      <span class="mis-highlightFont"
-                        ><label>[主户]</label></span
-                      >用户编号:<el-input
-                        v-model="queryParams_ffgx.customerNoMain"
-                        size="small"
-                        style="width: 200px"
-                        placeholder="输入用户编号"
-                        clearable
-                        class="mis-highlightFont"
-                        @change="clickQuery_ffgx()"
-                      >
-                        <el-button
-                          slot="append"
-                          size="small"
-                          icon="el-icon-search"
-                          @click="clickQuery_ffgx()"
-                        ></el-button>
+                      <span class="mis-highlightFont"><label>[主户]</label></span>用户编号:<el-input
+                        v-model="queryParams_ffgx.customerNoMain" size="small" style="width: 200px" placeholder="输入用户编号"
+                        clearable class="mis-highlightFont" @change="clickQuery_ffgx()">
+                        <el-button slot="append" size="small" icon="el-icon-search"
+                          @click="clickQuery_ffgx()"></el-button>
                       </el-input>
                     </el-col>
                     <el-col :span="8" class="list-opCol">
-                      <el-button
-                        type="primary"
-                        size="small"
-                        icon="el-icon-plus"
-                        @click="clickAdd_ffgx()"
-                        >绑定</el-button
-                      >
-                      <el-button
-                        type="danger"
-                        size="small"
-                        icon="el-icon-delete"
-                        @click="clickDelete_ffgx()"
-                        >移除</el-button
-                      >
+                      <el-button type="primary" size="small" icon="el-icon-plus" @click="clickAdd_ffgx()">绑定</el-button>
+                      <el-button type="danger" size="small" icon="el-icon-delete"
+                        @click="clickDelete_ffgx()">移除</el-button>
                     </el-col>
                   </el-row>
                 </div>
-                <div
-                  style="height: calc(100% - 45px); border: 1px solid #dcdfe6"
-                >
-                  <tfTable
-                    :table-data="dataList_ffgx"
-                    :column="columns_ffgx"
-                    :for-id="false"
-                    :pagination="true"
-                    :currentpage="pageInfo_ffgx.current"
-                    :pagesize="pageInfo_ffgx.size"
-                    :total="pageInfo_ffgx.tableTotal"
-                    :border="true"
-                    :multiple="true"
-                    :fixed="true"
-                    :isdelete="false"
-                    :is-select="false"
-                    :stripe="true"
-                    @handleCurrentChange="handleCurrentChange_ffgx"
-                    @handleSizeChange="handleSizeChange_ffgx"
-                    @handleSelectionChange="handleSelectionChange_ffgx"
-                    @sortChange="onCustomerSortChange_ffgx"
-                    @rowClick="handleRowClick_ffgx"
-                  />
+                <div style="height: calc(100% - 45px); border: 1px solid #dcdfe6">
+                  <tfTable :table-data="dataList_ffgx" :column="columns_ffgx" :for-id="false" :pagination="true"
+                    :currentpage="pageInfo_ffgx.current" :pagesize="pageInfo_ffgx.size" :total="pageInfo_ffgx.tableTotal"
+                    :border="true" :multiple="true" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
+                    @handleCurrentChange="handleCurrentChange_ffgx" @handleSizeChange="handleSizeChange_ffgx"
+                    @handleSelectionChange="handleSelectionChange_ffgx" @sortChange="onCustomerSortChange_ffgx"
+                    @rowClick="handleRowClick_ffgx" />
                 </div>
               </el-tab-pane>
             </el-tabs>
@@ -464,7 +333,7 @@ export default {
         .catch((ex) => {
           this.$message.error("查询失败!");
         })
-        .finally(() => {});
+        .finally(() => { });
     },
 
     /* ----- dom事件 ----- */
@@ -541,7 +410,7 @@ export default {
         .catch((ex) => {
           this.$message.error("查询失败!");
         })
-        .finally(() => {});
+        .finally(() => { });
     },
 
     /* ----- dom事件 ----- */
@@ -666,7 +535,7 @@ export default {
         .catch((ex) => {
           this.$message.error("查询失败!");
         })
-        .finally(() => {});
+        .finally(() => { });
     },
 
     /* ----- dom事件 ----- */