Commit b3858f7a6f3c7ce5049a4121a6f5240f0a182b21
1 parent
46f6440f
feat: 资信管理-区域-改成 枚举—卡片&新增&编辑&查看&审核&审核详情&变更 —CREDIT_ZONE
Showing
6 changed files
with
103 additions
and
18 deletions
| ... | ... | @@ -14,9 +14,10 @@ |
| 14 | 14 | </template> |
| 15 | 15 | </uni-list-item> |
| 16 | 16 | |
| 17 | - <uni-list-item title="区域"> | |
| 18 | - <template v-slot:footer> | |
| 19 | - <uni-easyinput v-model="form.region" placeholder="请输入区域" :inputBorder="false" /> | |
| 17 | + <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable | |
| 18 | + @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> | |
| 19 | + <template v-slot:body> | |
| 20 | + <view class="item-title"><text>区域</text></view> | |
| 20 | 21 | </template> |
| 21 | 22 | </uni-list-item> |
| 22 | 23 | <uni-list-item title="客户简称"> |
| ... | ... | @@ -328,6 +329,7 @@ export default { |
| 328 | 329 | form: { |
| 329 | 330 | serialNumber: '', |
| 330 | 331 | region: '', |
| 332 | + regionName: '', | |
| 331 | 333 | customerShortName: '', |
| 332 | 334 | enterpriseType: '', |
| 333 | 335 | enterpriseTypeName: '', |
| ... | ... | @@ -381,6 +383,7 @@ export default { |
| 381 | 383 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 382 | 384 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 383 | 385 | enterpriseTypeOptions: [], |
| 386 | + regionOptions: [], | |
| 384 | 387 | categoryOptions: [], |
| 385 | 388 | companyCategoryOptions: [], |
| 386 | 389 | investigatorOptions: [], |
| ... | ... | @@ -389,6 +392,7 @@ export default { |
| 389 | 392 | }, |
| 390 | 393 | created() { |
| 391 | 394 | this.loadSerialNumber() |
| 395 | + this.loadRegionOptions() | |
| 392 | 396 | this.loadEnterpriseTypeOptions() |
| 393 | 397 | this.loadCategoryOptions() |
| 394 | 398 | this.loadCompanyCategoryOptions() |
| ... | ... | @@ -408,6 +412,7 @@ export default { |
| 408 | 412 | displayLabel(field) { |
| 409 | 413 | const m = this.form |
| 410 | 414 | const map = { |
| 415 | + regionName: '请选择区域', | |
| 411 | 416 | enterpriseTypeName: '请选择企业类型', |
| 412 | 417 | suggestedCategoryName: '请选择建议客户分类', |
| 413 | 418 | } |
| ... | ... | @@ -420,6 +425,9 @@ export default { |
| 420 | 425 | const match = (options || []).find(o => String(o.label) === String(current) || String(o.value) === String(current)) |
| 421 | 426 | this.sheet = { ...this.sheet, visible: true, title, options, field, value: match ? match.value : '' } |
| 422 | 427 | } |
| 428 | + if (field === 'region') { | |
| 429 | + setSheet('区域', this.regionOptions) | |
| 430 | + } else | |
| 423 | 431 | if (field === 'enterpriseType') { |
| 424 | 432 | setSheet('企业类型', this.enterpriseTypeOptions) |
| 425 | 433 | } else if (field === 'suggestedCategory') { |
| ... | ... | @@ -490,6 +498,15 @@ export default { |
| 490 | 498 | this.enterpriseTypeOptions = [] |
| 491 | 499 | } |
| 492 | 500 | }, |
| 501 | + async loadRegionOptions() { | |
| 502 | + try { | |
| 503 | + const res = await getDicByCodeApi('CREDIT_ZONE') | |
| 504 | + const list = res.data || [] | |
| 505 | + this.regionOptions = (list || []).map(it => ({ label: it.name || '', value: it.code || '' })) | |
| 506 | + } catch (e) { | |
| 507 | + this.regionOptions = [] | |
| 508 | + } | |
| 509 | + }, | |
| 493 | 510 | async loadCategoryOptions() { |
| 494 | 511 | try { |
| 495 | 512 | const res = await getDicByCodeApi('CUSTOMER_CATEGORY') |
| ... | ... | @@ -552,6 +569,7 @@ export default { |
| 552 | 569 | }) |
| 553 | 570 | console.log('onSubmit__payload_2', payload); |
| 554 | 571 | delete payload.enterpriseTypeName |
| 572 | + delete payload.regionName | |
| 555 | 573 | delete payload.suggestedCategoryName |
| 556 | 574 | delete payload.companyIdName |
| 557 | 575 | delete payload.investigatorName | ... | ... |
| ... | ... | @@ -13,9 +13,10 @@ |
| 13 | 13 | </template> |
| 14 | 14 | </uni-list-item> |
| 15 | 15 | |
| 16 | - <uni-list-item title="区域"> | |
| 17 | - <template v-slot:footer> | |
| 18 | - <uni-easyinput v-model="form.region" placeholder="请输入区域" :inputBorder="false" /> | |
| 16 | + <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable | |
| 17 | + @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> | |
| 18 | + <template v-slot:body> | |
| 19 | + <view class="item-title"><text>区域</text></view> | |
| 19 | 20 | </template> |
| 20 | 21 | </uni-list-item> |
| 21 | 22 | <uni-list-item title="客户简称"> |
| ... | ... | @@ -328,6 +329,7 @@ export default { |
| 328 | 329 | id: '', |
| 329 | 330 | serialNumber: '', |
| 330 | 331 | region: '', |
| 332 | + regionName: '', | |
| 331 | 333 | customerShortName: '', |
| 332 | 334 | enterpriseType: '', |
| 333 | 335 | enterpriseTypeName: '', |
| ... | ... | @@ -383,6 +385,7 @@ export default { |
| 383 | 385 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 384 | 386 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 385 | 387 | enterpriseTypeOptions: [], |
| 388 | + regionOptions: [], | |
| 386 | 389 | categoryOptions: [], |
| 387 | 390 | investigatorOptions: [], |
| 388 | 391 | genderOptions: [] |
| ... | ... | @@ -393,6 +396,7 @@ export default { |
| 393 | 396 | if (this.id) this.loadDetail(this.id) |
| 394 | 397 | }, |
| 395 | 398 | created() { |
| 399 | + this.loadRegionOptions() | |
| 396 | 400 | this.loadEnterpriseTypeOptions() |
| 397 | 401 | this.loadCategoryOptions() |
| 398 | 402 | this.loadInvestigatorOptions() |
| ... | ... | @@ -400,6 +404,7 @@ export default { |
| 400 | 404 | }, |
| 401 | 405 | watch: { |
| 402 | 406 | enterpriseTypeOptions() { this.refreshLabelFields() }, |
| 407 | + regionOptions() { this.refreshLabelFields() }, | |
| 403 | 408 | categoryOptions() { this.refreshLabelFields() }, |
| 404 | 409 | investigatorOptions() { this.refreshLabelFields() } |
| 405 | 410 | }, |
| ... | ... | @@ -425,6 +430,7 @@ export default { |
| 425 | 430 | displayLabel(field) { |
| 426 | 431 | const m = this.form |
| 427 | 432 | const map = { |
| 433 | + regionName: '请选择区域', | |
| 428 | 434 | enterpriseTypeName: '请选择企业类型', |
| 429 | 435 | suggestedCategoryName: '请选择建议客户分类', |
| 430 | 436 | } |
| ... | ... | @@ -433,9 +439,11 @@ export default { |
| 433 | 439 | }, |
| 434 | 440 | refreshLabelFields() { |
| 435 | 441 | const et = this.enterpriseTypeOptions.find(o => String(o.value) === String(this.form.enterpriseType)) |
| 442 | + const rn = this.regionOptions.find(o => String(o.value) === String(this.form.region)) | |
| 436 | 443 | const ct = this.categoryOptions.find(o => String(o.value) === String(this.form.suggestedCategory)) |
| 437 | 444 | const iu = this.investigatorOptions.find(o => String(o.value) === String(this.form.investigator)) |
| 438 | 445 | this.form.enterpriseTypeName = et ? (et.label || '') : this.form.enterpriseTypeName |
| 446 | + this.form.regionName = rn ? (rn.label || '') : this.form.regionName | |
| 439 | 447 | this.form.suggestedCategoryName = ct ? (ct.label || '') : this.form.suggestedCategoryName |
| 440 | 448 | this.form.investigatorName = iu ? (iu.label || '') : this.form.investigatorName |
| 441 | 449 | }, |
| ... | ... | @@ -445,6 +453,9 @@ export default { |
| 445 | 453 | const match = (options || []).find(o => String(o.label) === String(current) || String(o.value) === String(current)) |
| 446 | 454 | this.sheet = { ...this.sheet, visible: true, title, options, field, value: match ? match.value : '' } |
| 447 | 455 | } |
| 456 | + if (field === 'region') { | |
| 457 | + setSheet('区域', this.regionOptions) | |
| 458 | + } else | |
| 448 | 459 | if (field === 'enterpriseType') { |
| 449 | 460 | setSheet('企业类型', this.enterpriseTypeOptions) |
| 450 | 461 | } else if (field === 'suggestedCategory') { |
| ... | ... | @@ -515,6 +526,15 @@ export default { |
| 515 | 526 | this.enterpriseTypeOptions = [] |
| 516 | 527 | } |
| 517 | 528 | }, |
| 529 | + async loadRegionOptions() { | |
| 530 | + try { | |
| 531 | + const res = await getDicByCodeApi('CREDIT_ZONE') | |
| 532 | + const list = res.data || [] | |
| 533 | + this.regionOptions = (list || []).map(it => ({ label: it.name || '', value: it.code || '' })) | |
| 534 | + } catch (e) { | |
| 535 | + this.regionOptions = [] | |
| 536 | + } | |
| 537 | + }, | |
| 518 | 538 | async loadCategoryOptions() { |
| 519 | 539 | try { |
| 520 | 540 | const res = await getDicByCodeApi('CUSTOMER_CATEGORY') |
| ... | ... | @@ -557,6 +577,7 @@ export default { |
| 557 | 577 | delete it.sexName |
| 558 | 578 | }) |
| 559 | 579 | delete payload.enterpriseTypeName |
| 580 | + delete payload.regionName | |
| 560 | 581 | delete payload.suggestedCategoryName |
| 561 | 582 | delete payload.companyIdName |
| 562 | 583 | delete payload.investigatorName | ... | ... |
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | <text class="row company">{{ form.companyName }}</text> |
| 7 | 7 | <view :class="['status', `status_${form.status}`]" /> |
| 8 | 8 | <view class="row"><text class="label">编号</text><text class="value">{{ form.serialNumber }}</text></view> |
| 9 | - <view class="row"><text class="label">区域</text><text class="value">{{ form.region }}</text></view> | |
| 9 | + <view class="row"><text class="label">区域</text><text class="value">{{ getDicName('CREDIT_ZONE', form.region, regionOptions) }}</text></view> | |
| 10 | 10 | <view class="row"><text class="label">客户简称</text><text class="value">{{ form.customerShortName }}</text> |
| 11 | 11 | </view> |
| 12 | 12 | <view class="row"><text class="label">企业类型</text><text class="value">{{ getDicName('ENTERPRISE_TYPE', |
| ... | ... | @@ -184,6 +184,7 @@ export default { |
| 184 | 184 | return { |
| 185 | 185 | form: {}, |
| 186 | 186 | enterpriseTypeOptions: [], |
| 187 | + regionOptions: [], | |
| 187 | 188 | genderOptions: [], |
| 188 | 189 | categoryOptions: [], |
| 189 | 190 | historyList: [], |
| ... | ... | @@ -192,7 +193,7 @@ export default { |
| 192 | 193 | { text: '审核详情', visible: true, variant: 'outline', event: 'auditDetail' }, |
| 193 | 194 | { text: '审核', visible: true, variant: 'primary', event: 'audit' }, |
| 194 | 195 | { text: '申请变更', visible: true, variant: 'outline', event: 'changeApply' }, |
| 195 | - { text: '取消', visible: true, variant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } }, | |
| 196 | + { text: '取消', visible: true, vxrariant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } }, | |
| 196 | 197 | ], |
| 197 | 198 | } |
| 198 | 199 | }, |
| ... | ... | @@ -219,6 +220,7 @@ export default { |
| 219 | 220 | } |
| 220 | 221 | }, |
| 221 | 222 | created() { |
| 223 | + this.loadRegionOptions() | |
| 222 | 224 | this.loadEnterpriseTypeOptions() |
| 223 | 225 | this.loadGenderOptions() |
| 224 | 226 | this.loadCategoryOptions() |
| ... | ... | @@ -248,6 +250,15 @@ export default { |
| 248 | 250 | this.enterpriseTypeOptions = [] |
| 249 | 251 | } |
| 250 | 252 | }, |
| 253 | + async loadRegionOptions() { | |
| 254 | + try { | |
| 255 | + const res = await getDicByCodeApi('CREDIT_ZONE') | |
| 256 | + const list = res.data || [] | |
| 257 | + this.regionOptions = Array.isArray(list) ? list : [] | |
| 258 | + } catch (e) { | |
| 259 | + this.regionOptions = [] | |
| 260 | + } | |
| 261 | + }, | |
| 251 | 262 | async loadGenderOptions() { |
| 252 | 263 | try { |
| 253 | 264 | const res = await getDicByCodeApi('GENDER_TYPE') |
| ... | ... | @@ -553,4 +564,4 @@ export default { |
| 553 | 564 | font-weight: 600; |
| 554 | 565 | } |
| 555 | 566 | } |
| 556 | -</style> | |
| \ No newline at end of file | ||
| 567 | +</style> | ... | ... |
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | <text>企业类型</text><text>{{ getDicName('ENTERPRISE_TYPE', item.enterpriseType, dicOptions.ENTERPRISE_TYPE) || '-' }}</text> |
| 34 | 34 | </view> |
| 35 | 35 | <view class="info-row"> |
| 36 | - <text>区域</text><text>{{ item.region || '-' }}</text> | |
| 36 | + <text>区域</text><text>{{ getDicName('CREDIT_ZONE', item.region, dicOptions.CREDIT_ZONE) || '-' }}</text> | |
| 37 | 37 | </view> |
| 38 | 38 | <view class="info-row"> |
| 39 | 39 | <text>客户分类</text><text |
| ... | ... | @@ -122,7 +122,8 @@ |
| 122 | 122 | dicOptions: { |
| 123 | 123 | CUSTOMER_CATEGORY: [], |
| 124 | 124 | AUDIT_STATUS: [], |
| 125 | - ENTERPRISE_TYPE: [] | |
| 125 | + ENTERPRISE_TYPE: [], | |
| 126 | + CREDIT_ZONE: [] | |
| 126 | 127 | }, |
| 127 | 128 | statusLocal: [], |
| 128 | 129 | categoryLocal: [] |
| ... | ... | @@ -267,11 +268,12 @@ |
| 267 | 268 | }) |
| 268 | 269 | }, |
| 269 | 270 | loadAllDicData() { |
| 270 | - const dicCodes = ['CUSTOMER_CATEGORY', 'AUDIT_STATUS', 'ENTERPRISE_TYPE'] | |
| 271 | + const dicCodes = ['CUSTOMER_CATEGORY', 'AUDIT_STATUS', 'ENTERPRISE_TYPE', 'CREDIT_ZONE'] | |
| 271 | 272 | return getDicByCodes(dicCodes).then(results => { |
| 272 | 273 | this.dicOptions.CUSTOMER_CATEGORY = results.CUSTOMER_CATEGORY.data || [] |
| 273 | 274 | this.dicOptions.AUDIT_STATUS = results.AUDIT_STATUS.data || [] |
| 274 | 275 | this.dicOptions.ENTERPRISE_TYPE = results.ENTERPRISE_TYPE.data || [] |
| 276 | + this.dicOptions.CREDIT_ZONE = results.CREDIT_ZONE.data || []; | |
| 275 | 277 | this.categoryLocal = (this.dicOptions.CUSTOMER_CATEGORY || []).map(it => ({ |
| 276 | 278 | value: it.code, |
| 277 | 279 | text: it.name |
| ... | ... | @@ -284,7 +286,8 @@ |
| 284 | 286 | this.dicOptions = { |
| 285 | 287 | CUSTOMER_CATEGORY: [], |
| 286 | 288 | AUDIT_STATUS: [], |
| 287 | - ENTERPRISE_TYPE: [] | |
| 289 | + ENTERPRISE_TYPE: [], | |
| 290 | + CREDIT_ZONE: [] | |
| 288 | 291 | } |
| 289 | 292 | this.categoryLocal = [] |
| 290 | 293 | this.statusLocal = [] | ... | ... |
| ... | ... | @@ -13,9 +13,10 @@ |
| 13 | 13 | </template> |
| 14 | 14 | </uni-list-item> |
| 15 | 15 | |
| 16 | - <uni-list-item title="区域"> | |
| 17 | - <template v-slot:footer> | |
| 18 | - <uni-easyinput v-model="form.region" placeholder="请输入区域" :inputBorder="false" /> | |
| 16 | + <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable | |
| 17 | + @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> | |
| 18 | + <template v-slot:body> | |
| 19 | + <view class="item-title"><text>区域</text></view> | |
| 19 | 20 | </template> |
| 20 | 21 | </uni-list-item> |
| 21 | 22 | <uni-list-item title="客户简称"> |
| ... | ... | @@ -328,6 +329,7 @@ export default { |
| 328 | 329 | id: '', |
| 329 | 330 | serialNumber: '', |
| 330 | 331 | region: '', |
| 332 | + regionName: '', | |
| 331 | 333 | customerShortName: '', |
| 332 | 334 | enterpriseType: '', |
| 333 | 335 | enterpriseTypeName: '', |
| ... | ... | @@ -383,6 +385,7 @@ export default { |
| 383 | 385 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 384 | 386 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 385 | 387 | enterpriseTypeOptions: [], |
| 388 | + regionOptions: [], | |
| 386 | 389 | categoryOptions: [], |
| 387 | 390 | investigatorOptions: [], |
| 388 | 391 | genderOptions: [] |
| ... | ... | @@ -393,6 +396,7 @@ export default { |
| 393 | 396 | if (this.id) this.loadDetail(this.id) |
| 394 | 397 | }, |
| 395 | 398 | created() { |
| 399 | + this.loadRegionOptions() | |
| 396 | 400 | this.loadEnterpriseTypeOptions() |
| 397 | 401 | this.loadCategoryOptions() |
| 398 | 402 | this.loadInvestigatorOptions() |
| ... | ... | @@ -400,6 +404,7 @@ export default { |
| 400 | 404 | }, |
| 401 | 405 | watch: { |
| 402 | 406 | enterpriseTypeOptions() { this.refreshLabelFields() }, |
| 407 | + regionOptions() { this.refreshLabelFields() }, | |
| 403 | 408 | categoryOptions() { this.refreshLabelFields() }, |
| 404 | 409 | investigatorOptions() { this.refreshLabelFields() } |
| 405 | 410 | }, |
| ... | ... | @@ -425,6 +430,7 @@ export default { |
| 425 | 430 | displayLabel(field) { |
| 426 | 431 | const m = this.form |
| 427 | 432 | const map = { |
| 433 | + regionName: '请选择区域', | |
| 428 | 434 | enterpriseTypeName: '请选择企业类型', |
| 429 | 435 | suggestedCategoryName: '请选择建议客户分类', |
| 430 | 436 | } |
| ... | ... | @@ -433,9 +439,11 @@ export default { |
| 433 | 439 | }, |
| 434 | 440 | refreshLabelFields() { |
| 435 | 441 | const et = this.enterpriseTypeOptions.find(o => String(o.value) === String(this.form.enterpriseType)) |
| 442 | + const rn = this.regionOptions.find(o => String(o.value) === String(this.form.region)) | |
| 436 | 443 | const ct = this.categoryOptions.find(o => String(o.value) === String(this.form.suggestedCategory)) |
| 437 | 444 | const iu = this.investigatorOptions.find(o => String(o.value) === String(this.form.investigator)) |
| 438 | 445 | this.form.enterpriseTypeName = et ? (et.label || '') : this.form.enterpriseTypeName |
| 446 | + this.form.regionName = rn ? (rn.label || '') : this.form.regionName | |
| 439 | 447 | this.form.suggestedCategoryName = ct ? (ct.label || '') : this.form.suggestedCategoryName |
| 440 | 448 | this.form.investigatorName = iu ? (iu.label || '') : this.form.investigatorName |
| 441 | 449 | }, |
| ... | ... | @@ -445,6 +453,9 @@ export default { |
| 445 | 453 | const match = (options || []).find(o => String(o.label) === String(current) || String(o.value) === String(current)) |
| 446 | 454 | this.sheet = { ...this.sheet, visible: true, title, options, field, value: match ? match.value : '' } |
| 447 | 455 | } |
| 456 | + if (field === 'region') { | |
| 457 | + setSheet('区域', this.regionOptions) | |
| 458 | + } else | |
| 448 | 459 | if (field === 'enterpriseType') { |
| 449 | 460 | setSheet('企业类型', this.enterpriseTypeOptions) |
| 450 | 461 | } else if (field === 'suggestedCategory') { |
| ... | ... | @@ -515,6 +526,15 @@ export default { |
| 515 | 526 | this.enterpriseTypeOptions = [] |
| 516 | 527 | } |
| 517 | 528 | }, |
| 529 | + async loadRegionOptions() { | |
| 530 | + try { | |
| 531 | + const res = await getDicByCodeApi('CREDIT_ZONE') | |
| 532 | + const list = res.data || [] | |
| 533 | + this.regionOptions = (list || []).map(it => ({ label: it.name || '', value: it.code || '' })) | |
| 534 | + } catch (e) { | |
| 535 | + this.regionOptions = [] | |
| 536 | + } | |
| 537 | + }, | |
| 518 | 538 | async loadCategoryOptions() { |
| 519 | 539 | try { |
| 520 | 540 | const res = await getDicByCodeApi('CUSTOMER_CATEGORY') |
| ... | ... | @@ -557,6 +577,7 @@ export default { |
| 557 | 577 | delete it.sexName |
| 558 | 578 | }) |
| 559 | 579 | delete payload.enterpriseTypeName |
| 580 | + delete payload.regionName | |
| 560 | 581 | delete payload.suggestedCategoryName |
| 561 | 582 | delete payload.companyIdName |
| 562 | 583 | delete payload.investigatorName | ... | ... |
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <view class="section"> |
| 4 | 4 | <text class="row company">{{ form.companyName }}</text> |
| 5 | 5 | <view class="row"><text class="label">编号</text><text class="value">{{ form.serialNumber }}</text></view> |
| 6 | - <view class="row"><text class="label">区域</text><text class="value">{{ form.region }}</text></view> | |
| 6 | + <view class="row"><text class="label">区域</text><text class="value">{{ getDicName('CREDIT_ZONE', form.region, regionOptions) }}</text></view> | |
| 7 | 7 | <view class="row"><text class="label">客户简称</text><text class="value">{{ form.customerShortName }}</text> |
| 8 | 8 | </view> |
| 9 | 9 | <view class="row"><text class="label">企业类型</text><text class="value">{{ getDicName('ENTERPRISE_TYPE', |
| ... | ... | @@ -188,12 +188,14 @@ export default { |
| 188 | 188 | return { |
| 189 | 189 | form: {}, |
| 190 | 190 | enterpriseTypeOptions: [], |
| 191 | + regionOptions: [], | |
| 191 | 192 | genderOptions: [], |
| 192 | 193 | categoryOptions: [], |
| 193 | 194 | historyList: [] |
| 194 | 195 | } |
| 195 | 196 | }, |
| 196 | 197 | created() { |
| 198 | + this.loadRegionOptions() | |
| 197 | 199 | this.loadEnterpriseTypeOptions() |
| 198 | 200 | this.loadGenderOptions() |
| 199 | 201 | this.loadCategoryOptions() |
| ... | ... | @@ -228,6 +230,15 @@ export default { |
| 228 | 230 | this.enterpriseTypeOptions = [] |
| 229 | 231 | } |
| 230 | 232 | }, |
| 233 | + async loadRegionOptions() { | |
| 234 | + try { | |
| 235 | + const res = await getDicByCodeApi('CREDIT_ZONE') | |
| 236 | + const list = res.data || [] | |
| 237 | + this.regionOptions = Array.isArray(list) ? list : [] | |
| 238 | + } catch (e) { | |
| 239 | + this.regionOptions = [] | |
| 240 | + } | |
| 241 | + }, | |
| 231 | 242 | async loadGenderOptions() { |
| 232 | 243 | try { |
| 233 | 244 | const res = await getDicByCodeApi('GENDER_TYPE') |
| ... | ... | @@ -427,4 +438,4 @@ export default { |
| 427 | 438 | .mgb10 { |
| 428 | 439 | margin-bottom: 20rpx; |
| 429 | 440 | } |
| 430 | -</style> | |
| \ No newline at end of file | ||
| 441 | +</style> | ... | ... |