viewer.vue
17.4 KB
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<template>
<view class="detail-page">
<view class="section">
<text class="row company">{{ form.companyName }}</text>
<view class="row"><text class="label">编号</text><text class="value">{{ form.serialNumber }}</text></view>
<view class="row"><text class="label">办事处</text><text class="value">{{ form.deptName }}</text></view>
<view class="row"><text class="label">区域</text><text class="value">{{ form.regionName }}</text></view>
<view class="row"><text class="label">简写名称</text><text class="value">{{ form.customerShortName }}</text>
</view>
<view class="row"><text class="label">企业类型</text><text class="value">{{ getDicName('ENTERPRISE_TYPE',
form.enterpriseType, enterpriseTypeOptions) }}</text></view>
<view class="row"><text class="label">企业操作类型</text><text class="value">{{ form.enterpriseOperationType
}}</text></view>
<view class="row"><text class="label">登记日期</text><text class="value">{{ form.registerDate }}</text></view>
</view>
<view class="title-header">
<image class="title-header_icon" src="/static/images/title.png" />
<span>基础资料</span>
</view>
<view class="section">
<view class="row"><text class="label">企业性质</text><text class="value">{{ form.companyNature }}</text></view>
<view class="row"><text class="label">注册资本</text><text class="value">{{ form.registeredCapital }}</text>
</view>
<view class="row"><text class="label">账号</text><text class="value">{{ form.bankAccount }}</text></view>
<view class="row"><text class="label">开户行</text><text class="value">{{ form.bankName }}</text></view>
<view class="row"><text class="label">税号</text><text class="value">{{ form.taxNumber }}</text></view>
<view class="row"><text class="label">注册时间</text><text class="value">{{ form.registrationTime }}</text>
</view>
<view class="row"><text class="label">经营年限</text><text class="value">{{ form.businessYears }}</text></view>
<view class="row"><text class="label">单位地址</text><text class="value">{{ form.companyAddress }}</text></view>
<view class="row"><text class="label">经营范围</text><text class="value">{{ form.businessScope }}</text></view>
<view class="row"><text class="label">工商信息</text><text class="value act">{{ form.businessFileName }}</text>
</view>
<view class="row"><text class="label">股东信息</text><text class="value act">{{ form.shareholderFileName
}}</text>
</view>
</view>
<view class="mgb10">
<CorePersonnel mode="view" :options="genderOptions" :list="form.corePersonnelList" />
</view>
<view class="title-header">
<image class="title-header_icon" src="/static/images/title.png" />
<span>资产经营情况</span>
</view>
<view class="section">
<view class="row"><text class="label">经营场地属性</text><text class="value">{{ form.businessProperty }}</text>
</view>
<view class="row"><text class="label">占地面积</text><text class="value">{{ form.landArea }} 平方米</text></view>
<view class="row"><text class="label">仓储条件</text><text class="value">{{ form.storageConditions }}</text>
</view>
<view class="row"><text class="label">员工人数</text><text class="value">{{ form.employeeCount }}</text></view>
<view class="row"><text class="label">设备属性</text><text class="value">{{ form.equipmentAttributes }}</text>
</view>
<view class="row"><text class="label">资产评估</text><text class="value">{{ form.assetEvaluation }}</text>
</view>
<view class="row"><text class="label">上年度销售额</text><text class="value">{{ form.lastYearSales }}</text>
</view>
<view class="row"><text class="label">月均销量</text><text class="value">{{ form.monthlyAvgSales }}</text>
</view>
<view class="row"><text class="label">销项发票所开品名与计量单位</text><text class="value">{{ form.invoiceItemUnit
}}</text></view>
<view class="row"><text class="label">认证证书</text><text class="value">{{ form.certificationCertificate
}}</text></view>
<view class="row"><text class="label">我司售与产品于经营范围是否匹配</text><text class="value">{{ form.productMatch
}}</text>
</view>
<view class="row"><text class="label">主要客户</text><text class="value">{{ form.majorCustomers }}</text></view>
<view class="row"><text class="label">主营项目</text><text class="value">{{ form.mainProjects }}</text></view>
<view class="row"><text class="label">从事行业</text><text class="value">{{ form.industryInvolved }}</text>
</view>
<view class="row"><text class="label">在该行业中的经验</text><text class="value">{{ form.industryExperience
}}</text>
</view>
<view class="row"><text class="label">是否与其他企业有经济纠纷 违规信息 拖欠员工薪资</text><text class="value">{{ form.hasDispute
}}</text></view>
</view>
<view class="title-header">
<image class="title-header_icon" src="/static/images/title.png" />
<span>与我司合作</span>
</view>
<view class="section">
<view class="row"><text class="label">与我司合作时间</text><text class="value">{{ form.cooperationStartDate
}}</text>
</view>
<view class="row"><text class="label">月均操作量</text><text class="value">{{ form.monthlyAvgVolume }}</text>
</view>
<view class="row"><text class="label">是否口头协议操作</text><text class="value">{{ form.isVerbalAgreement }}</text>
</view>
<view class="row"><text class="label">是否签订其他协议</text><text class="value">{{ form.otherAgreements }}</text>
</view>
<view class="row"><text class="label">与我司操作是否签订长年合同</text><text class="value">{{ form.hasLongTermContract
}}</text></view>
<view class="row"><text class="label">合同类型</text><text class="value">{{ form.contractType }}</text></view>
<view class="row"><text class="label">是否有过中断及中断原因</text><text class="value">{{ form.hasInterruption
}}</text>
</view>
</view>
<view class="title-header">
<image class="title-header_icon" src="/static/images/title.png" />
<span>办事处意见</span>
</view>
<view class="section">
<view class="row"><text class="label">建议客户分类</text>
<text class="value">
<text
:class="[form.suggestedCategory ? 'category' : '', getCategoryClass(getDicName('CUSTOMER_CATEGORY', form.suggestedCategory, categoryOptions))]">{{
getDicName('CUSTOMER_CATEGORY', form.suggestedCategory, categoryOptions) }}</text>
</text>
</view>
<view class="row"><text class="label">授信额度</text><text class="value">{{ form.creditLimit }} 万元</text></view>
<view class="row"><text class="label">结算期限</text><text class="value">{{ form.settlementPeriod }}</text>
</view>
<view class="row"><text class="label">加工操作方案</text><text class="value">{{ form.materialSupplyPlan }}</text>
</view>
<view class="row"><text class="label">调查人</text><text class="value">{{ form.investigatorName }}</text>
</view>
<view class="row"><text class="label">审核主管</text><text class="value">{{ form.supervisorReviewName }}</text>
</view>
</view>
<view class="title-header">
<image class="title-header_icon" src="/static/images/title.png" />
<span>职能核对</span>
</view>
<view class="section">
<view class="row"><text class="label">年度总销量</text><text class="value">{{ form.annualTotalSales }}</text>
</view>
<view class="row"><text class="label">主要行业</text><text class="value">{{ form.mainIndustry }}</text></view>
<view class="row"><text class="label">年度款料概况</text><text class="value">{{ form.annualMaterialOverview
}}</text></view>
</view>
<view class="title-header">
<image class="title-header_icon" src="/static/images/title.png" />
<span>公司评审</span>
</view>
<view class="section">
<view class="row"><text class="label">客户分类</text>
<text class="value">
<text
:class="[form.companySuggestedCategory ? 'category' : '', getCategoryClass(getDicName('CUSTOMER_CATEGORY', form.companySuggestedCategory, categoryOptions))]">{{
getDicName('CUSTOMER_CATEGORY', form.companySuggestedCategory, categoryOptions) }}</text>
</text>
</view>
<view class="row"><text class="label">授信额度</text><text class="value">{{ form.companyCreditLimit }}</text>
</view>
<view class="row"><text class="label">结算期限</text><text class="value">{{ form.companySettlementPeriod
}}</text>
</view>
<view class="row"><text class="label">加工操作方案</text><text class="value">{{ form.companyMaterialSupplyPlan
}}</text></view>
</view>
<view class="title-header">
<image class="title-header_icon" src="/static/images/title.png" />
<span>变更记录</span>
</view>
<view class="section">
<view class="history-header">
<text class="col col1">序号</text>
<text class="col col2">变更时间</text>
<text class="col col3">操作</text>
</view>
<view v-for="(h, i) in historyList" :key="(h && (h.id || h.code)) || i" class="history-row">
<text class="col col1">{{ i + 1 }}</text>
<text class="col col2">{{ h.createTime || '' }}</text>
<text class="col col3 link" @click="onViewHistory(h)">查看</text>
</view>
</view>
</view>
</template>
<script>
import { getExamineById, getByIdExamineCustomerCreditHistoryList } from '@/api/credit_manage.js'
import { getDicName } from '@/utils/dic.js'
import { getDicByCodeApi } from '@/api/base.js'
import CorePersonnel from './corePersonnel.vue'
export default {
name: 'CustomerCreditApprove',
props: { id: { type: [String, Number], default: '' } },
components: { CorePersonnel },
data() {
return {
form: {},
enterpriseTypeOptions: [],
regionOptions: [],
genderOptions: [],
categoryOptions: [],
historyList: []
}
},
created() {
this.loadRegionOptions()
this.loadEnterpriseTypeOptions()
this.loadGenderOptions()
this.loadCategoryOptions()
},
watch: {
id: {
immediate: true,
handler(val) {
const v = (val !== undefined && val !== null) ? String(val) : ''
if (v) this.loadDetail(v)
}
}
},
methods: {
async loadDetail(id) {
try {
const res = await getExamineById(id)
const data = res.data || {}
this.form = { ...data }
const cid = this.form.id || this.form.code || id
if (cid) this.loadHistoryList(cid)
} catch (e) {
this.form = {}
}
},
async loadEnterpriseTypeOptions() {
try {
const res = await getDicByCodeApi('ENTERPRISE_TYPE')
const list = res.data || []
this.enterpriseTypeOptions = Array.isArray(list) ? list : []
} catch (e) {
this.enterpriseTypeOptions = []
}
},
async loadRegionOptions() {
try {
const res = await getDicByCodeApi('CREDIT_ZONE')
const list = res.data || []
this.regionOptions = Array.isArray(list) ? list : []
} catch (e) {
this.regionOptions = []
}
},
async loadGenderOptions() {
try {
const res = await getDicByCodeApi('GENDER_TYPE')
const list = res.data || []
this.genderOptions = Array.isArray(list) ? list : []
} catch (e) {
this.genderOptions = []
}
},
async loadCategoryOptions() {
try {
const res = await getDicByCodeApi('CUSTOMER_CATEGORY')
const list = res.data || []
this.categoryOptions = Array.isArray(list) ? list : []
} catch (e) {
this.categoryOptions = []
}
},
async loadHistoryList(creditId) {
try {
const res = await getByIdExamineCustomerCreditHistoryList(creditId)
const _data = res.data || []
this.historyList = Array.isArray(_data) ? _data : []
} catch (e) {
this.historyList = []
}
},
onViewHistory(item) {
const id = item && (item.id)
if (!id) return
const query = '?id=' + encodeURIComponent(id)
uni.navigateTo({ url: '/pages/credit_manage/history_detail' + query })
},
getDicName,
getCategoryClass(categoryName) {
if (!categoryName) return ''
if (categoryName.includes('A') || categoryName.includes('a')) {
return 'category_A'
} else if (categoryName.includes('B') || categoryName.includes('b')) {
return 'category_B'
} else if (categoryName.includes('C') || categoryName.includes('c')) {
return 'category_C'
} else if (categoryName.includes('D') || categoryName.includes('d')) {
return 'category_D'
}
},
getFormValues() {
const m = this.form || {}
return JSON.parse(JSON.stringify(m))
}
}
}
</script>
<style lang="scss" scoped>
.detail-page {
background: #f3f3f3;
}
.section {
padding: 32rpx;
background: #fff;
margin-bottom: 20rpx;
position: relative;
.row {
display: flex;
margin-bottom: 28rpx;
&:last-child {
margin-bottom: 0;
}
&.company {
font-size: 36rpx;
font-weight: 600;
color: rgba(0, 0, 0, 0.9);
}
.label {
max-width: 420rpx;
line-height: 32rpx;
font-size: 28rpx;
color: rgba(0, 0, 0, 0.6);
}
.value {
flex: 1;
line-height: 32rpx;
font-size: 28rpx;
color: rgba(0, 0, 0, 0.9);
text-align: right;
.category {
display: inline-block;
padding: 4rpx 12rpx;
border-radius: 6rpx;
font-size: 24rpx;
width: auto;
&.category_A {
background: #FFF0ED;
color: #D54941;
}
&.category_B {
background: #FFF1E9;
color: #E37318;
}
&.category_C {
background: #F2F3FF;
color: $theme-primary;
}
&.category_D {
background: #E3F9E9;
color: #2BA471;
}
}
}
.act {
color: $theme-primary;
}
}
}
.title-header {
background-color: #fff;
display: flex;
align-items: center;
padding: 32rpx 32rpx 22rpx;
border-bottom: 1rpx dashed #f0f0f0;
&_icon {
width: 32rpx;
height: 28rpx;
margin-right: 16rpx;
}
span {
color: rgba(0, 0, 0, 0.9);
font-size: 32rpx;
line-height: 44rpx;
font-weight: 600;
}
}
.history-header {
display: flex;
margin-bottom: 20rpx;
font-size: 28rpx;
color: rgba(0, 0, 0, 0.6);
.col1 {
width: 120rpx;
}
.col2 {
flex: 1;
text-align: center;
}
.col3 {
width: 160rpx;
text-align: right;
}
}
.history-row {
display: flex;
align-items: center;
margin-bottom: 16rpx;
font-size: 28rpx;
.col1 {
width: 120rpx;
}
.col2 {
flex: 1;
text-align: center;
}
.col3 {
width: 160rpx;
text-align: right;
}
.link {
color: $theme-primary;
}
}
.mgb10 {
margin-bottom: 20rpx;
}
</style>