Ver Fonte

表格展示

sunyize há 2 anos atrás
pai
commit
7cbd65651d

+ 295 - 6
src/views/networkAccess/registration.vue

@@ -24,9 +24,10 @@
           <div>
 <!--            <registation-Modal ref="registationModel" @ok="modalFormOk2"></registation-Modal> :row-class-name="tableRowClassName"-->
             <div>
-<!--              <a-button type="primary" @click="showModal">研判结果异常展示</a-button>-->
+<!--              <a-button type="primary" @click="showModal">研判结果异常展示</a-button>         :transformCellText="dataShow"       -->
               <a-modal v-model:open="open" title="研判结果异常展示" @ok="handleOk" @cancel="onCance" :width="1000">
-                <a-table :columns="columns" :data-source="dataList" :scroll="{ x: 1500, y: 300 }" >
+
+                <a-table :columns="columns" :data-source="dataList" :scroll="{ x: 1500, y: 300 }"  :rowClassName="cellStyle"   >
                   <template #bodyCell="{ column }">
                     <template v-if="column.key === 'operation'">
 
@@ -534,6 +535,22 @@
                 {{ value }}
               </div>
             </a-col>
+
+
+
+            <a-table :columns="columns2" :data-source="dataRisk" bordered v-if="newDatas.length>1">
+              <template #bodyCell="{ column, text }">
+                <template v-if="column.dataIndex === 'name'">
+                  <a>{{ text }}</a>
+                </template>
+              </template>
+<!--              <template #title>Header</template>-->
+<!--              <template #footer>Footer</template>-->
+            </a-table>
+
+
+
+
           </div>
         </a-form-model>
 
@@ -730,6 +747,18 @@ export default {
         { title: '现用号码使用用途', dataIndex: 'phonePurpose', key: 'phonePurpose',width: 150 },
         { title: '后续处理', width: 150, dataIndex: 'numberResults', key: 'numberResults'},
        ],
+      columns2:[
+        {
+          title: '填写条目',
+          dataIndex: 'name',
+        },
+        {
+          title: '触发风险以及说明',
+          className: 'text',
+          dataIndex: 'text',
+        }
+      ],
+      dataRisk:[],
       open:false,
       disabledList:[],
       fetching: false,
@@ -1153,6 +1182,18 @@ export default {
 
   methods: {
 
+    // dataShow(text, column, record, index ){
+    //   if (text.record.calltestResults === '未接通' ) {
+    //     return text.record.calltestResults= '未接通22'
+    //   }
+    // },
+
+    //改变表格某一列或者某一个单元格文本颜色
+    cellStyle(record,index){
+      if (record.calltestResults === '未接通' || record.calltestResults == '2'|| record.calltestResults == '3') {
+        return 'red'
+      }
+    },
   resultData(result,newPhones){
     for (let i = 0; i < result.length; i++){
       if(result[i].cardStartTimeAndEnd!==null && result[i].cardStartTimeAndEnd!==''){
@@ -1965,9 +2006,9 @@ export default {
                   }
                   view[key] = result[0][key];
                   if (key==='newPhone'){
-
-                     newPhones = result[0][key].split(',');
-
+                    if (  result[0][key]!==null &&  result[0][key]!==''){
+                      newPhones = result[0][key].split(',');
+                    }
                   }
                   if (key==='industry'){
 
@@ -2281,6 +2322,251 @@ export default {
       }
       return info;
     },
+
+    getDataRisk(data){
+      this.dataList=[];
+      var getDataList=this.dataList;
+      var dataLists =[];
+      dataLists.push(data);
+
+      if(dataLists[0].cardStartTimeAndEnd!==null && dataLists[0].cardStartTimeAndEnd!==''){
+        if (dataLists[0].cardStartTimeAndEnd==="1"){
+          dataLists[0].cardStartTimeAndEnd='是'
+        }
+        if (dataLists[0].cardStartTimeAndEnd==="2"){
+          dataLists[0].cardStartTimeAndEnd='否'
+        }
+      }
+      if (dataLists[0].sysBusinessHall!==null &&dataLists[0].sysBusinessHall!=='' ){
+        for (var item of this.sysCompany) {
+          if (item.id === this.model.company) {
+            this.companyName = item.name;
+            for (var it of item.sysBusinessHallList) {
+              if (it.id === this.model.sysBusinessHall) {
+                dataLists[0].sysBusinessHall= this.companyName+ this.hallName
+              }
+            }
+          }
+        }
+      }
+      //智能地址研判
+      if (dataLists[0].judgmentResearch!==null && dataLists[0].judgmentResearch!==''){
+        if (dataLists[0].judgmentResearch==="1"){
+          dataLists[0].judgmentResearch='智能地址研判-异常'
+        }
+        if (dataLists[0].judgmentResearch==="2"){
+          dataLists[0].judgmentResearch='智能地址研判-正常'
+        }
+      }
+      //人工地址判研
+      if (dataLists[0].judgmentResearchAddress!==null && dataLists[0].judgmentResearchAddress!==''){
+        if (dataLists[0].judgmentResearchAddress==="1"){
+          dataLists[0].judgmentResearchAddress='人工地址判研-异常'
+        }
+        if (dataLists[0].judgmentResearchAddress==="2"){
+          dataLists[0].judgmentResearchAddress='人工地址判研-正常'
+        }
+      }
+      //拨测结果
+      if (dataLists[0].calltestResults!==null && dataLists[0].calltestResults!==''){
+        if (dataLists[0].calltestResults==="1"){
+          dataLists[0].calltestResults='关机'
+        }
+        if (dataLists[0].calltestResults==="2"){
+          dataLists[0].calltestResults='未接通'
+        }
+        if (dataLists[0].calltestResults==="3"){
+          dataLists[0].calltestResults='可接通不知晓入网事宜'
+        }
+        if (dataLists[0].calltestResults==="4"){
+          dataLists[0].calltestResults='可接通认可办理'
+        }
+      }
+      //运营商
+      if (dataLists[0].operatorType!==null && dataLists[0].operatorType!==''){
+        if (dataLists[0].operatorType==="1"){
+          dataLists[0].operatorType='移动'
+        }
+        if (dataLists[0].operatorType==="2"){
+          dataLists[0].operatorType='联调'
+        }if (dataLists[0].operatorType==="3"){
+          dataLists[0].operatorType='电信'
+        }if (dataLists[0].operatorType==="4"){
+          dataLists[0].operatorType='其它'
+        }
+      }
+      //一证通查结果
+      if (dataLists[0].operator!==null && dataLists[0].operator!==''){
+        if (dataLists[0].operator==="1"){
+          dataLists[0].operator='本地运营商'
+        }
+        if (dataLists[0].operator==="2"){
+          dataLists[0].operator='异地运营商'
+        }
+      }
+      // if ( dataLists[0]['newPhone']!==null &&  dataLists[0]['newPhone']!==''){
+      //   var newPhones = dataLists[0]['newPhone'].split(',');
+      //   let newPhonesStr='';
+      //   for (var item of  newPhones) {
+      //     if (item.match(RegExp('newPhone1+')) && item.replace('newPhone1+', '') !== '') {
+      //       newPhonesStr = newPhonesStr+item.replace('newPhone1+', '')+"  "
+      //     }
+      //     if (item.match(RegExp('newPhone2+')) && item.replace('newPhone2+', '') !== '') {
+      //       newPhonesStr = newPhonesStr+item.replace('newPhone2+', '')+"  "
+      //     }
+      //     if (item.match(RegExp('newPhone3+')) && item.replace('newPhone3+', '') !== '') {
+      //       newPhonesStr = newPhonesStr+item.replace('newPhone3+', '')+"  "
+      //     }
+      //     if (item.match(RegExp('newPhone4+')) && item.replace('newPhone4+', '') !== '') {
+      //       newPhonesStr = newPhonesStr+item.replace('newPhone4+', '')+"  "
+      //     }
+      //     if (item.match(RegExp('newPhone5+')) && item.replace('newPhone5+', '') !== '') {
+      //       newPhonesStr = newPhonesStr+item.replace('newPhone5+', '')+"  "
+      //     }
+      //   }
+      //   dataLists[0].newPhone=newPhonesStr;
+      // }
+
+
+      // if (dataLists[0].numberResults!==null && dataLists[0].numberResults!==''){
+      //   var numberResultsList = dataLists[0]["numberResults"].split(',');
+      //   var numberResultsListStr ='';
+      //   for (var item of  numberResultsList) {
+      //     if (item==='1'){
+      //       numberResultsListStr=numberResultsListStr+'非高危'
+      //     }
+      //     if (item==='2'){
+      //       numberResultsListStr=numberResultsListStr+'已报关停'
+      //     }
+      //     if (item==='3'){
+      //       numberResultsListStr=numberResultsListStr+'已报蓝名单 '
+      //     }
+      //     if (item==='4'){
+      //       numberResultsListStr=numberResultsListStr+' 已报紫名单'
+      //     }
+      //   }
+      //   dataLists[0].numberResults=numberResultsListStr
+      // }
+
+      var that =this
+      that.dataRisk=[];
+
+      Object.keys(dataLists[0]).forEach(function (key) {
+        var map ={};
+        if (key==='cardNo'){
+          var birthday = dataLists[0]['cardNo'].substring(6, 14);
+          var year = birthday.substring(0, 4);
+
+          // 计算年龄
+          var currentYear = new Date().getFullYear();
+          var age = currentYear - parseInt(year);
+          if (age>=60){
+            age=age+'(老年人)'
+            map.name ='客户年龄: '  ;
+            map.text = age ;
+            that.dataRisk.push(map)
+          }
+          if (age<=23){
+            age=age+'(可能是在校生)'
+            map.name ='客户年龄: '  ;
+            map.text = age ;
+            that.dataRisk.push(map)
+          }
+        }
+        //身份证是否到期
+        if (key==='cardStartTimeAndEnd'){
+          if (dataLists[0]['cardStartTimeAndEnd']==='是'){
+            map.name ='身份证号码:【'+dataLists[0]['cardNo']+'】 是否在有效期' ;
+            map.text = dataLists[0]['cardStartTimeAndEnd'];
+            that.dataRisk.push(map)
+          }
+        }
+        //拨测结果
+        if (key==='calltestResults'){
+          if ( dataLists[0][key]!=='可接通认可办理'){
+            map.name ='电话号码'+dataLists[0]['phone'] +' - 拨测结果';
+            map.text = dataLists[0][key];
+            that.dataRisk.push(map)
+          }
+        }
+
+        //地址 人工判研
+        if (key==='judgmentResearchAddress'){
+          if (dataLists[0]['judgmentResearchAddress']==='人工地址判研-异常'){
+            map.name ='营业厅地址:【'+  that.companyName +'--'+ that.hallName +'】 工作地址:【'+dataLists[0]['wordAddress'] +'】 现住地址:【'+ dataLists[0]['currentAddress']+'】' ;
+            map.text = dataLists[0]['judgmentResearchAddress'];
+            that.dataRisk.push(map)
+          }
+        }
+        //地址 智能
+        if (key==='judgmentResearch'){
+          if (dataLists[0]['judgmentResearch']==='智能地址研判-异常'){
+            map.name ='营业厅地址:【'+  that.companyName +'--'+ that.hallName +'】 工作地址:【'+dataLists[0]['wordAddress'] +'】 现住地址:【'+ dataLists[0]['currentAddress']+'】' ;
+            map.text = dataLists[0]['judgmentResearch'];
+            that.dataRisk.push(map)
+          }
+        }
+        //第二页 排除填写
+        if (key==='isDxNumber'){
+          if (dataLists[0]['isDxNumber']==='2'){
+            map.name ='客户名下无电信号码:' ;
+            map.text = '否';
+            that.dataRisk.push(map)
+          }
+        }
+        if (key==='isBroadband'){
+          if (dataLists[0]['isBroadband']==='2'){
+            map.name ='申请号码办理征信类、融合宽带业务:' ;
+            map.text = '否';
+            that.dataRisk.push(map)
+          }
+        }
+        if (key==='isUseTo'){
+          if (dataLists[0]['isUseTo']==='1'){
+            map.name =' 申请号码使用用途异常:' ;
+            map.text = '是';
+            that.dataRisk.push(map)
+          }
+        }
+        if (key==='isRefund'){
+          if (dataLists[0]['isRefund']==='1'){
+            map.name =' 客户名下号码存在异常高频率充值、退费:' ;
+            map.text = '是';
+            that.dataRisk.push(map)
+          }
+        }
+        if (key==='isShutDown'){
+          if (dataLists[0]['isShutDown']==='1'){
+            map.name ='客户名下已有号码(含已注销号码)存在各类关停:' ;
+            map.text = '是';
+            that.dataRisk.push(map)
+          }
+        }
+        if (key==='isNewly'){
+          if (dataLists[0]['isNewly']==='1'){
+            map.name ='客户名下在用号码无使用记录,仍要求新办号码:' ;
+            map.text = '是';
+            that.dataRisk.push(map)
+          }
+        }
+        if (key==='isChannel'){
+          if (dataLists[0]['isChannel']==='1'){
+            map.name ='在多个渠道多频次入网的异常情况:' ;
+            map.text = '是';
+            that.dataRisk.push(map)
+          }
+        }
+        if (key==='isInvolvingFraud'){
+          if (dataLists[0]['isInvolvingFraud']==='1'){
+            map.name ='黑名单到期客户新入网的高危疑似涉诈号码:' ;
+            map.text = '是';
+            that.dataRisk.push(map)
+          }
+        }
+      });
+
+
+    },
     /**下一步骤*/
     nextSteps() {
       if (this.current===0){
@@ -2359,7 +2645,7 @@ export default {
             this.newDatas.push(i++ + ' 、该用户现住地址(到村/小区),工作地址距离过远 请确认是否继续操作 。 ')
           }
         }
-
+        this.getDataRisk(data)
 
         if (this.newDatas.length === 1) {
           //newDatas.push(h('p', null, i++ +'、 暂无风险提示 请继续操作。 '))
@@ -2752,4 +3038,7 @@ export default {
   line-height: 1;
   content: '*';
 }
+/deep/.ant-table-tbody .red{
+   color: red !important;
+}
 </style>

+ 4 - 4
src/views/networkAccess/userStatistics.vue

@@ -554,10 +554,10 @@ export default {
     },
     /**修改*/
     showImproveAndUpload(record) {
-      if (!record.createTime.match(RegExp(this.getDate()))){
-        this.$message.warning('此输入非天创建 禁止修改', 3);
-        return
-      }
+      // if (!record.createTime.match(RegExp(this.getDate()))){
+      //   this.$message.warning('此输入非天创建 禁止修改', 3);
+      //   return
+      // }
       this.$router.push({path: '/networkAccess/registration', query: {id: record.id,cardNo: record.cardNo}});
     },
     showImproveAndUploadAdmin(record) {