zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<template>
  <div class="product">
    <div v-for="(item,index) in riskData" :key="index">
      <div class="_block">
        <p class="title">
          <span></span>
          审批信息
        </p>
        <el-form :model="item" inline label-width="160px" size="small">
          <el-form-item label="审批结果">
            <el-input v-model="item.respcodeDesc.value" disabled></el-input>
          </el-form-item>
          <el-form-item label="审批外部拒绝原因">
            <el-input v-model="item.respcodeMsg.value" disabled></el-input>
          </el-form-item>
          <el-form-item label="审批内部拒绝原因">
            <el-input v-model="item.InnerMsg.value" disabled></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div class="_block">
        <p class="title">
          <span></span>
          辅助决策信息
        </p>
        <el-table
          stripe
          :data="item.decisionInfos"
          style="width: 100%"
          :cell-class-name="cellClass"
          highlight-current-row
          :header-cell-class-name="headerCellClass">
          <el-table-column prop="aidcode" label="辅助决策代码">
            <template slot-scope="{row}">
              <span>{{row.aidcode.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="aiddesc" label="辅助决策类型">
            <template slot-scope="{row}">
              <span>{{row.aiddesc.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="aidvalue" label="辅助决策">
            <template slot-scope="{row}">
              <span>{{row.aidvalue.value}}</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="_block">
        <p class="title">
          <span></span>
          风险提示信息
        </p>
        <el-table
          stripe
          :data="item.tipsInfos"
          style="width: 100%"
          :cell-class-name="cellClass"
          highlight-current-row
          :header-cell-class-name="headerCellClass">
          <el-table-column prop="rulecode" label="风险提示代码">
            <template slot-scope="{row}">
              <span>{{row.rulecode.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="rulelevel" label="风险级别">
            <template slot-scope="{row}">
              <span>{{row.rulelevel.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="ruletype" label="提示类型">
            <template slot-scope="{row}">
              <span>{{row.ruletype.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="ruledesc" label="风险提示">
            <template slot-scope="{row}">
              <span>{{row.ruledesc.value}}</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="_block">
        <p class="title">
          <span></span>
          相关人征信信息
        </p>
        <el-table
          stripe
          :data="item.reportInfos"
          style="width: 100%"
          :cell-class-name="cellClass"
          highlight-current-row
          :header-cell-class-name="headerCellClass">
          <el-table-column prop="borrowTypeDesc" label="类型" min-width="200">
            <template slot-scope="{row}">
              <span>{{row.borrowTypeDesc.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="relationshipDesc" label="与借款人关系" min-width="200">
            <template slot-scope="{row}">
              <span>{{row.relationshipDesc.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="customerName" label="客户名称" min-width="200">
            <template slot-scope="{row}">
              <span>{{row.customerName.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="idType" label="证件类型" min-width="200">
            <template slot-scope="{row}">
              <span>{{row.idType.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="idCard" label="证件号码" min-width="200">
            <template slot-scope="{row}">
              <span>{{row.idCard.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="statusDesc" label="状态" min-width="200">
            <template slot-scope="{row}">
              <span>{{row.statusDesc.value}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="successTime" label="获取成功时间" min-width="200">
            <template slot-scope="{row}">
              <span>{{row.successTime.value}}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" min-width="200">
            <template slot-scope="scope">
              <el-button @click="handleView(scope.row)" type="text" size="small" v-no-more-click>查看</el-button>
              <el-button 
                :disabled="scope.row.statusDesc.value=='获取成功'||scope.row.statusDesc.value=='获取中'" 
                @click="handleObtain(scope.row)" 
                type="text" 
                size="small"
              >获取</el-button>
              <el-button 
                :disabled="scope.row.statusDesc.value=='未获取'||scope.row.statusDesc.value=='获取失败'||scope.row.statusDesc.value=='获取中'" 
                @click="handleRefresh(scope.row)" 
                type="text" 
                size="small"
              >刷新</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="fixedBtn">
      <el-button
        size="medium"
        plain
        @click="prevStep"
      >上一页</el-button>
      <el-button
        size="medium"
        type="primary"
        @click="nextPage"
      >下一页</el-button>
    </div>
  </div>
</template>
<script>
import {
  qryRiskAutoExamineDetail,
  getCreditReport
} from '@/api/product'
import {
  downloadCreditReport
} from '@comprehensive/serve/public'
import common from "@/utils/common";
export default {
  data () {
    return {
      applyInfo: this.$store.state.product.applyInfo,
      applyMenu: this.$store.state.product.applyMenu,
      riskData:[]
    }
  },
  created () {
    this.getRiskAutoExamineDetail()
  },
  methods: {
    headerCellClass() {
      return "headerCellClass";
    },
    cellClass() {
      return "cellClass";
    },
    // 获取风控审批信息详情
    getRiskAutoExamineDetail(){
      const arr = []
      this.$parent._data.loading = true
      qryRiskAutoExamineDetail({applySerialNo:this.applyInfo.serialNo}).then(res=>{
        this.$parent._data.loading = false
        arr.push(res.result)
        this.riskData = arr
      })
    },
    // 查看
    handleView(row){
      // 查看功能暂不开放
      this.$message.warning("暂不支持人行征信报告获取及查询");
      return
      const obj = {
        applyserialno:this.applyInfo.serialNo,
        certid:row.idCard.value,
        customername:row.customerName.value,
        relationtype:row.borrowType.value
      }
      downloadCreditReport(obj)
    },
    // 刷新
    handleRefresh(row){
      if(row.successTime.value){
        const first = row.successTime.value  //开始时间
        const second = new Date();  //结束时间
        const date = new Date(Date.parse(first.replace(/-/g, "/"))); //转换格式
        const time = 30 * 24 * 60 * 60 * 1000; //间隔30天
        if(( second - date ) > time){
          common.comfirm('提示',`该操作会产生人行征信查询记录,请确认是否需要继续查询【${row.customerName.value}】的人行征信信息?`,()=>{
            this.handleObtain(row)
          })
        }else{
          this.handleObtain(row)
        }
      }else{
        this.handleObtain(row)
      }
    },
    // 获取
    handleObtain(row){
      const obj = {
        applyserialno:this.applyInfo.serialNo,
        certid:row.idCard.value,
        customername:row.customerName.value,
      }
      this.$parent._data.loading = true
      getCreditReport(obj).then(res=>{
        this.$parent._data.loading = false
        if(res.code=='00'){
          this.getRiskAutoExamineDetail()
        }
      })
    },
    // 上一步
    prevStep() {
      this.applyMenu.forEach((val, index) => {
        if (val.tabname == "风控审批信息") {
          common.tabInfo(
            this.applyMenu[index - 1].tabname,
            this.applyInfo.flowno,
            this
          );
        }
      });
    },
    // 下一页
    nextPage() {
      // 调用父组件的查询左侧tab的方法
      this.$parent.updateApplyTabTree();
      this.applyMenu.forEach((val, index) => {
        if (val.tabname == "风控审批信息") {
          common.tabInfo(
            this.applyMenu[index + 1].tabname,
            this.applyInfo.flowno,
            this
          );
        }
      });
    },
  }
}
</script>