Commit 3794a24bb69355bb4598c0c70b12e2e5e0537ee2

Authored by 史婷婷
1 parent 22e0a07b

feat: 客户资信管理-列表&筛选-完成

Showing 1 changed file with 37 additions and 18 deletions
... ... @@ -2,7 +2,7 @@
2 2 <view class="page">
3 3 <view class="dev-list-fixed">
4 4 <view class="search-row">
5   - <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入客户名称" clearButton="auto"
  5 + <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入简写名称" clearButton="auto"
6 6 cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search"
7 7 @input="onSearchInput" />
8 8 <view class="tool-icons">
... ... @@ -22,7 +22,8 @@
22 22 <text class="title omit2">{{ item.companyName }}</text>
23 23 <view class="status-box">
24 24 <text
25   - :class="['status2', `status2_${item.frozenStatus === '正常' ? '1' : '2'}`]">{{ item.frozenStatus }}</text>
  25 + v-if="item.frozenStatus === '冻结'"
  26 + :class="['status2']">{{ item.frozenStatus === '冻结' ? '已冻结' : '' }}</text>
26 27 <text
27 28 :class="['status', `status_${item.status}`]">{{ getDicName('AUDIT_STATUS', item.status, dicOptions.AUDIT_STATUS) }}</text>
28 29 </view>
... ... @@ -35,7 +36,7 @@
35 36 </view>
36 37 <view class="info-row">
37 38 <text>客户分类</text><text
38   - :class="[item.companySuggestedCategory ? 'category' : '']">{{ getDicName('CUSTOMER_CATEGORY', item.companySuggestedCategory, dicOptions.CUSTOMER_CATEGORY) || '-' }}</text>
  39 + :class="[item.companySuggestedCategory ? 'category' : '', getCategoryClass(getDicName('CUSTOMER_CATEGORY', item.companySuggestedCategory, dicOptions.CUSTOMER_CATEGORY))]">{{ getDicName('CUSTOMER_CATEGORY', item.companySuggestedCategory, dicOptions.CUSTOMER_CATEGORY) || '-' }}</text>
39 40 </view>
40 41 <view class="info-row">
41 42 <text>登记日期</text><text>{{ item.registerDate || '-' }}</text>
... ... @@ -129,7 +130,7 @@
129 130 computed: {
130 131 extraCombined() {
131 132 return {
132   - customerName: this.searchKeywordDebounced || undefined
  133 + companyName: this.searchKeywordDebounced || undefined
133 134 }
134 135 }
135 136 },
... ... @@ -242,7 +243,7 @@
242 243 delete params.dateRange
243 244 }
244 245 if (this.searchKeywordDebounced) {
245   - params.customerName = this.searchKeywordDebounced
  246 + params.companyName = this.searchKeywordDebounced
246 247 }
247 248 return queryApi(params)
248 249 .then(res => {
... ... @@ -298,7 +299,19 @@
298 299 url: '/pages/credit_manage/detail' + query
299 300 })
300 301 },
301   - getDicName: getDicName
  302 + getDicName: getDicName,
  303 + getCategoryClass(categoryName) {
  304 + if (!categoryName) return ''
  305 + if (categoryName.includes('A') || categoryName.includes('a')) {
  306 + return 'category_A'
  307 + } else if (categoryName.includes('B') || categoryName.includes('b')) {
  308 + return 'category_B'
  309 + } else if (categoryName.includes('C') || categoryName.includes('c')) {
  310 + return 'category_C'
  311 + } else if (categoryName.includes('D') || categoryName.includes('d')) {
  312 + return 'category_D'
  313 + }
  314 + }
302 315
303 316 }
304 317 }
... ... @@ -420,16 +433,8 @@
420 433 font-size: 24rpx;
421 434 padding: 0 14rpx;
422 435 border-radius: 6rpx;
423   -
424   - &.status2_1 {
425   - background: #2BA471;
426   - }
427   -
428   - &.status2_2 {
429   - background: #E7E7E7;
430   - color: #323241;
431   - }
432   -
  436 + background: #E7E7E7;
  437 + color: #323241;
433 438 }
434 439
435 440 }
... ... @@ -461,9 +466,23 @@
461 466 padding: 4rpx 12rpx;
462 467 border-radius: 6rpx;
463 468 font-size: 24rpx;
464   - background: #E3F9E9;
465   - color: #2BA471;
466 469 width: auto;
  470 + &.category_A {
  471 + background: #FFF0ED;
  472 + color: #D54941;
  473 + }
  474 + &.category_B {
  475 + background: #FFF1E9;
  476 + color: #E37318;
  477 + }
  478 + &.category_C {
  479 + background: #F2F3FF;
  480 + color: #3D48A3;
  481 + }
  482 + &.category_D {
  483 + background: #E3F9E9;
  484 + color: #2BA471;
  485 + }
467 486 }
468 487 }
469 488
... ...