|
...
|
...
|
@@ -14,6 +14,12 @@ |
|
14
|
14
|
</template>
|
|
15
|
15
|
</uni-list-item>
|
|
16
|
16
|
|
|
|
17
|
+ <uni-list-item title="办事处">
|
|
|
18
|
+ <template v-slot:footer>
|
|
|
19
|
+ <view class="readonly-text">{{ form.deptName }}</view>
|
|
|
20
|
+ </template>
|
|
|
21
|
+ </uni-list-item>
|
|
|
22
|
+
|
|
17
|
23
|
<uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable
|
|
18
|
24
|
@click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow>
|
|
19
|
25
|
<template v-slot:body>
|
|
...
|
...
|
@@ -309,7 +315,8 @@ |
|
309
|
315
|
@confirm="onSheetConfirm" />
|
|
310
|
316
|
<RelateSelectSheet :visible.sync="relate.visible" :title="relate.title" :source="relate.source"
|
|
311
|
317
|
:display-fields="relate.display" :multiple="relate.multiple" :row-key="relate.rowKey"
|
|
312
|
|
- :selectedKeys.sync="relate.selectedKeys" :source-extra="{ source: 'CUSTOMER_CREDIT' }" @confirm="onRelateConfirm" />
|
|
|
318
|
+ :selectedKeys.sync="relate.selectedKeys" :source-extra="{ source: 'CUSTOMER_CREDIT' }"
|
|
|
319
|
+ @confirm="onRelateConfirm" />
|
|
313
|
320
|
</view>
|
|
314
|
321
|
|
|
315
|
322
|
</template>
|
|
...
|
...
|
@@ -320,6 +327,7 @@ import RelateSelectSheet from '@/components/relate-select/index.vue' |
|
320
|
327
|
import { generateCreditCode, getAllUser, getDeptUser, createApi, getArea } from '@/api/credit_manage.js'
|
|
321
|
328
|
import { getDicByCodeApi } from '@/api/base.js'
|
|
322
|
329
|
import CorePersonnel from './corePersonnel.vue'
|
|
|
330
|
+import { getDeptApi } from '@/api/contract'
|
|
323
|
331
|
|
|
324
|
332
|
export default {
|
|
325
|
333
|
name: 'CreditManageAdd',
|
|
...
|
...
|
@@ -379,6 +387,8 @@ export default { |
|
379
|
387
|
mainIndustry: '',
|
|
380
|
388
|
annualMaterialOverview: '',
|
|
381
|
389
|
corePersonnelList: [],
|
|
|
390
|
+ deptName: '',
|
|
|
391
|
+ deptId: '',
|
|
382
|
392
|
},
|
|
383
|
393
|
sheet: { visible: false, title: '请选择', field: '', options: [], value: '' },
|
|
384
|
394
|
relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' },
|
|
...
|
...
|
@@ -391,6 +401,7 @@ export default { |
|
391
|
401
|
}
|
|
392
|
402
|
},
|
|
393
|
403
|
created() {
|
|
|
404
|
+ this.getDept()
|
|
394
|
405
|
this.loadSerialNumber()
|
|
395
|
406
|
this.loadRegionOptions()
|
|
396
|
407
|
this.loadEnterpriseTypeOptions()
|
|
...
|
...
|
@@ -401,6 +412,15 @@ export default { |
|
401
|
412
|
this.loadGenderOptions()
|
|
402
|
413
|
},
|
|
403
|
414
|
methods: {
|
|
|
415
|
+ // 查询当前人所在办事处
|
|
|
416
|
+ getDept() {
|
|
|
417
|
+ getDeptApi().then(res => {
|
|
|
418
|
+ if (res.code === 200) {
|
|
|
419
|
+ this.form.deptName = res.data.name || ''
|
|
|
420
|
+ this.form.deptId = res.data.id || ''
|
|
|
421
|
+ }
|
|
|
422
|
+ })
|
|
|
423
|
+ },
|
|
404
|
424
|
async loadSerialNumber() {
|
|
405
|
425
|
try {
|
|
406
|
426
|
const res = await generateCreditCode()
|
|
...
|
...
|
@@ -428,13 +448,13 @@ export default { |
|
428
|
448
|
if (field === 'region') {
|
|
429
|
449
|
setSheet('区域', this.regionOptions)
|
|
430
|
450
|
} else
|
|
431
|
|
- if (field === 'enterpriseType') {
|
|
432
|
|
- setSheet('企业类型', this.enterpriseTypeOptions)
|
|
433
|
|
- } else if (field === 'suggestedCategory') {
|
|
434
|
|
- setSheet('建议客户分类', this.categoryOptions)
|
|
435
|
|
- } else if (field === 'investigator') {
|
|
436
|
|
- setSheet('调查人', this.investigatorOptions)
|
|
437
|
|
- }
|
|
|
451
|
+ if (field === 'enterpriseType') {
|
|
|
452
|
+ setSheet('企业类型', this.enterpriseTypeOptions)
|
|
|
453
|
+ } else if (field === 'suggestedCategory') {
|
|
|
454
|
+ setSheet('建议客户分类', this.categoryOptions)
|
|
|
455
|
+ } else if (field === 'investigator') {
|
|
|
456
|
+ setSheet('调查人', this.investigatorOptions)
|
|
|
457
|
+ }
|
|
438
|
458
|
},
|
|
439
|
459
|
onSheetConfirm({ value, label }) {
|
|
440
|
460
|
const field = this.sheet.field
|
|
...
|
...
|
@@ -558,7 +578,7 @@ export default { |
|
558
|
578
|
},
|
|
559
|
579
|
async onSubmit() {
|
|
560
|
580
|
if (!this.validateRequired()) return
|
|
561
|
|
- const payload = {
|
|
|
581
|
+ const payload = {
|
|
562
|
582
|
...this.form,
|
|
563
|
583
|
status: 'AUDIT'
|
|
564
|
584
|
}
|
|
...
|
...
|
@@ -573,6 +593,7 @@ export default { |
|
573
|
593
|
delete payload.suggestedCategoryName
|
|
574
|
594
|
delete payload.companyIdName
|
|
575
|
595
|
delete payload.investigatorName
|
|
|
596
|
+ delete payload.deptName
|
|
576
|
597
|
try {
|
|
577
|
598
|
await createApi(payload)
|
|
578
|
599
|
uni.showToast({ title: '提交成功', icon: 'success' })
|
|
...
|
...
|
@@ -760,4 +781,15 @@ export default { |
|
760
|
781
|
}
|
|
761
|
782
|
}
|
|
762
|
783
|
}
|
|
|
784
|
+
|
|
|
785
|
+
|
|
|
786
|
+/* 只读文本样式 */
|
|
|
787
|
+.readonly-text {
|
|
|
788
|
+ color: rgba(0, 0, 0, 0.9);
|
|
|
789
|
+ font-size: 32rpx;
|
|
|
790
|
+ line-height: 48rpx;
|
|
|
791
|
+ text-align: right;
|
|
|
792
|
+ white-space: pre-wrap;
|
|
|
793
|
+ word-break: break-all;
|
|
|
794
|
+}
|
|
763
|
795
|
</style> |
...
|
...
|
|