commonElectricalEnergy.vue
16.8 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
443
444
445
446
447
448
449
450
<template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-card title="基本信息" :bordered="false" class="scoped-approval">
<a-row :gutter="24">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:16}" label="婚否">
<a-radio-group v-decorator="['marriageStatus',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.marriageStatus:''}]" :disabled="disRead">
<a-radio :value="0">未知</a-radio>
<a-radio :value="1">已婚</a-radio>
<a-radio :value="2">未婚</a-radio>
<a-radio :value="3">离异</a-radio>
</a-radio-group>
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item :labelCol="{span:12}" :wrapperCol="{span:10}" label="是否有实控人">
<a-radio-group v-decorator="['actualControllersStatus',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.actualControllersStatus:''}]" :disabled="disRead">
<a-radio :value="0">无</a-radio>
<a-radio :value="1">有</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col :span="8" v-if="cusSupplementaryInfo.actualControllersStatus==1">
<a-form-item label="实控人姓名" :labelCol="{span:10}" :wrapperCol="{span:14}">
<a-input v-decorator="['actualControllersName',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.actualControllersName:''}]" :readOnly="disRead" />
</a-form-item>
</a-col>
<a-col :span="8" v-if="cusSupplementaryInfo.actualControllersStatus==1">
<a-form-item label="实控人电话" :labelCol="{span:10}" :wrapperCol="{span:14}">
<a-input v-decorator="['actualControllersPhone',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.actualControllersPhone:''}]" :readOnly="disRead" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:7}" label="从业年限(年)">
<a-input v-decorator="['workingYear',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.workingYear:''}]" :readOnly="disRead" />
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:7}" label="是否有被执行信息">
<a-input v-decorator="['executedInformation',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.executedInformation:''}]" :readOnly="disRead" />
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:7}" label="与所留联系人的关系">
<a-input v-decorator="['relation',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.relation:''}]" :readOnly="disRead" />
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:7}" label="居住地址">
<a-input v-decorator="['homeAddress',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.homeAddress:''}]" :readOnly="disRead" />
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item :labelCol="{span:10}" :wrapperCol="{span:8}" label="实际地址与注册地是否一致">
<a-radio-group v-decorator="['registeredPlaceStatus',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.registeredPlaceStatus:''}]" :disabled="disRead">
<a-radio :value="true">是</a-radio>
<a-radio :value="false">否</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col :span="12" v-if="cusSupplementaryInfo.registeredPlaceStatus=='true'">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:20}" label="实际地址">
<a-input v-decorator="['registeredPlace',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.registeredPlace:''}]" :readOnly="disRead" />
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="经营模式及规模" :bordered="false">
<a-row :gutter="24">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:20}" label="是否有集散场地">
<a-radio-group v-decorator="['distributingCenterStatus',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.distributingCenterStatus:''}]" :disabled="disRead">
<a-radio :value="true">有</a-radio>
<a-radio :value="false">无</a-radio>
</a-radio-group>
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item :labelCol="{span:12}" :wrapperCol="{span:12}" label="自有车辆数">
<a-input v-decorator="['vehicleNumber',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.vehicleNumber:''}]" :readOnly="disRead" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item :labelCol="{span:12}" :wrapperCol="{span:12}" label="挂靠车辆数">
<a-input v-decorator="['anchoredVehicleNumber',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.anchoredVehicleNumber:''}]" :readOnly="disRead" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:20}" label="企业类型">
<a-checkbox-group :options="childDotData" :value="[cusSupplementaryInfo?cusSupplementaryInfo.enterprisesType:'']" @change="onChange" />
</a-checkbox-group>
</a-form-item>
</a-row>
<a-row :gutter="24" v-if="dedicatedShow">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:20}" label="专线">
<a-table ref="table" size="middle" bordered rowKey="id" :columns="specialLineData" :dataSource="cusDedicatedLineList" :pagination="false" :loading="loading" @change="handleTableChange" style="padding-top:40px;">
</a-table>
</a-form-item>
</a-row>
<a-row :gutter="24" v-if="motorcadeShow">
<a-form-item :labelCol="{span:4}" :wrapperCol="{span:20}" label="车队及三方">
<a-table ref="table" size="middle" bordered rowKey="id" :columns="motorcadeData" :dataSource="cusThreePartyInfoList" :pagination="false" :loading="loading" @change="handleTableChange" style="padding-top:40px;">
</a-table>
</a-form-item>
</a-row>
</a-card>
<a-card title="成本" :bordered="false">
<a-table ref="table" size="middle" bordered rowKey="id" :columns="costData" :dataSource="cusCostInfoList" :pagination="false" :loading="loading" @change="handleTableChange" style="padding-top:20px;">
</a-table>
</a-card>
<a-card title="负债" :bordered="false">
<a-table ref="table" size="middle" bordered rowKey="id" :columns="liabilitiesData" :dataSource="cusLiabilitiesInfoList" :pagination="false" :loading="loading" @change="handleTableChange" style="padding-top:20px;">
</a-table>
</a-card>
<a-card title="备注" :bordered="false">
<a-form-item label="">
<a-textarea rows="4" placeholder="最多输入2000字" v-decorator="['remark',{'initialValue':cusSupplementaryInfo?cusSupplementaryInfo.remark:''}]" :readOnly="disRead" />
</a-form-item>
</a-card>
</a-form>
</a-spin>
</template>
<script>
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import { queryCusPhoneCheckInfo } from '@/api/configApi'
export default {
name: 'personApprovalRecord',
mixins: [JeecgListMixin],
props: {
userType: {
type: Number,
default: null,
},
customerNo: {
type: String,
default: ''
}
},
data () {
return {
disRead: true,
confirmLoading: false,
current: 3,
phoneCheckLoanTypeCode: JSON.parse(sessionStorage.getItem('PHONE_CHECK_LOAN_TYPE_CODE')), // 电核负债类型
phoneCheckCostTypeCode: JSON.parse(sessionStorage.getItem('PHONE_CHECK_COST_TYPE_CODE')), // 电核成本类型
dedicatedShow: false, // 专线
motorcadeShow: false, // 车队及三方
freightSum: 0, // 车队及三方专线总费用 销售负债比计算用
cusSupplementaryInfo: '', // 基本信息
cusLiabilitiesInfoList: [], // 负债信息
cusCostInfoList: [], // 成本信息
cusDedicatedLineList: [], // 专线信息
cusThreePartyInfoList: [], // 三方及车队信息
historicalApprovalData: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 60,
},
{
title: '审批岗位',
align: 'center',
width: '100px',
dataIndex: 'realname01'
},
{
title: '审批人员',
align: 'center',
width: '100px',
dataIndex: 'realname02'
},
{
title: '审批结果',
align: 'center',
width: '100px',
dataIndex: 'realname03'
},
{
title: '审批意见',
align: 'center',
width: '100px',
dataIndex: 'realname04'
},
{
title: '审批时间',
align: 'center',
dataIndex: 'realname05'
},
{
title: '审批报告',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 100,
fixed: 'right'
}
],
childDotData: [
{
label: '专线',
value: '1',
},
{
label: '车队',
value: '2',
},
{
label: '三方',
value: '3',
},
{
label: '专线 + 车队',
value: '12',
},
{
label: '专线 + 三方',
value: '13',
},
],
specialLineData: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
align: 'center',
customRender: function (t, r, index) {
return typeof (t.id) == 'number' ? '运费合计' : parseInt(index) + 1
}
},
{
title: '线路',
align: 'center',
dataIndex: 'departureLine'
},
{
title: '月均发车趟',
align: 'center',
dataIndex: 'monthAverageDeparture'
},
{
title: '单趟运费(元)',
align: 'center',
dataIndex: 'singleFreight'
},
{
title: '运费(元)',
align: 'center',
dataIndex: 'freight'
}
],
motorcadeData: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
align: 'center',
customRender: function (t, r, index) {
return typeof (t.id) == 'number' ? '运费合计' : parseInt(index) + 1
}
},
{
title: '货源方名称',
align: 'center',
dataIndex: 'sourceName'
},
{
title: '占比(%)',
align: 'center',
dataIndex: 'ratio'
},
{
title: '运费',
align: 'center',
dataIndex: 'freight'
},
{
title: '合作年限',
align: 'center',
dataIndex: 'cooperationYears'
},
],
costData: [
{
title: '成本项目',
align: 'center',
dataIndex: 'costNameCode',
customRender: (t, r, index) => {
if (t == '成本合计') {
return t
} else {
for (var i = 0; i < this.phoneCheckCostTypeCode.length; i++) {
if (t === this.phoneCheckCostTypeCode[i].name) {
return this.phoneCheckCostTypeCode[i].title
}
}
}
}
},
{
title: '金额(元)',
align: 'center',
dataIndex: 'amount',
},
{
title: '备注',
align: 'center',
dataIndex: 'remark'
},
],
liabilitiesData: [
{
title: '贷款种类',
align: 'center',
dataIndex: 'loanTypeCode',
customRender: (t, r, index) => {
if (t == '销售负债比') {
return t;
} else {
for (var i = 0; i < this.phoneCheckLoanTypeCode.length; i++) {
if (t === this.phoneCheckLoanTypeCode[i].name) {
return this.phoneCheckLoanTypeCode[i].title
}
}
}
}
},
{
title: '金额(元)',
align: 'center',
dataIndex: 'amount',
customRender: function (t, r, index) {
return r.amountRatio ? r.amountRatio : t
}
},
{
title: '备注',
align: 'center',
dataIndex: 'remark'
},
],
form: this.$form.createForm(this),
disableMixinCreated: true,
url: {
list: '/admin/collPersonalApply/queryCollPersonalApplyList',
},
}
},
created () {
console.log(this.customerNo)
},
methods: {
loadData () {
this.cusSupplementaryInfo = ''; // 基本信息
this.cusLiabilitiesInfoList = []; // 负债信息
this.cusCostInfoList = []; // 成本信息
this.cusDedicatedLineList = []; // 专线信息
this.cusThreePartyInfoList = []; // 三方及车队信息
// let _p = { 'customerNo': 'E20200317150433938058' }
let _p = { 'customerNo': this.customerNo }
queryCusPhoneCheckInfo(_p).then(res => {
if (res.status.statusCode == 0) {
let data = res.result
data.cusDedicatedLineList.length > 0 ? this.cusDedicatedLineList = this.Total(data.cusDedicatedLineList) : this.cusDedicatedLineList = []
data.cusSupplementaryInfo ? this.cusSupplementaryInfo = data.cusSupplementaryInfo : this.cusSupplementaryInfo = {}
data.cusCostInfoList.length > 0 ? this.cusCostInfoList = this.Total(data.cusCostInfoList) : this.cusCostInfoList = []
data.cusThreePartyInfoList.length > 0 ? this.cusThreePartyInfoList = this.Total(data.cusThreePartyInfoList) : this.cusThreePartyInfoList = []
data.cusLiabilitiesInfoList.length > 0 ? this.cusLiabilitiesInfoList = this.TotalLiabilities(data.cusLiabilitiesInfoList) : this.cusLiabilitiesInfoList = []// 需计算
let type = this.cusSupplementaryInfo.enterprisesType
if (type == 1) { // 根据类型展示专线 车队及三方
this.dedicatedShow = true;
} else if (type == 2 || type == 3) {
this.motorcadeShow = true;
} else if (type == 12 || type == 13) {
this.dedicatedShow = true;
this.motorcadeShow = true;
}
} else {
this.$message.warning(res.status.statusReason)
}
})
},
Total (data) { // 合计处理
let monthAverageDepartureSum = 0, // 专线=>月均发车趟
singleFreightSum = 0, // 专线=>单趟运费(元)
freightSum = 0, // 专线 车队及三方 =>运费
ratioSum = 0, // 车队及三方 =>占比
cooperationYearsSum = 0, // 车队及三方 =>合作年限
amountSum = 0; // 成本=>金额(元)
data.map(v => {
monthAverageDepartureSum += v.monthAverageDeparture
singleFreightSum += v.singleFreight
freightSum += v.freight
ratioSum += v.ratio
cooperationYearsSum += v.cooperationYears
amountSum += v.amount
})
if (freightSum) {
this.freightSum += freightSum
}
let total = {
'id': new Date().getTime(),
'departureLine': '-',
'sourceName': '-',
'costNameCode': '成本合计',
'loanTypeCode': '销售负债比',
'remark': '-',
'monthAverageDeparture': '-', // monthAverageDepartureSum
'singleFreight': '-', // singleFreightSum
'ratio': ratioSum.toFixed(2),
'cooperationYears': cooperationYearsSum.toFixed(2),
'freight': freightSum.toFixed(2),
'amount': amountSum.toFixed(2),
}
data.push(total)
return data;
},
TotalLiabilities (data) {
let amountRatio = 0; // 负债=>销售负债比
data.map(v => {
amountRatio += v.amount
})
let total = {
'id': new Date().getTime(),
'loanTypeCode': '销售负债比',
'remark': '-',
'amountRatio': (amountRatio / this.freightSum).toFixed(2)
}
data.push(total)
return data;
},
// 自定义附件信息查看
handleAttachmentLook () {
},
onChange () {
}
}
}
</script>