Commit 3794a24bb69355bb4598c0c70b12e2e5e0537ee2

Authored by 史婷婷
1 parent 22e0a07b

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

Showing 1 changed file with 37 additions and 18 deletions
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view class="page"> 2 <view class="page">
3 <view class="dev-list-fixed"> 3 <view class="dev-list-fixed">
4 <view class="search-row"> 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 cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search" 6 cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search"
7 @input="onSearchInput" /> 7 @input="onSearchInput" />
8 <view class="tool-icons"> 8 <view class="tool-icons">
@@ -22,7 +22,8 @@ @@ -22,7 +22,8 @@
22 <text class="title omit2">{{ item.companyName }}</text> 22 <text class="title omit2">{{ item.companyName }}</text>
23 <view class="status-box"> 23 <view class="status-box">
24 <text 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 <text 27 <text
27 :class="['status', `status_${item.status}`]">{{ getDicName('AUDIT_STATUS', item.status, dicOptions.AUDIT_STATUS) }}</text> 28 :class="['status', `status_${item.status}`]">{{ getDicName('AUDIT_STATUS', item.status, dicOptions.AUDIT_STATUS) }}</text>
28 </view> 29 </view>
@@ -35,7 +36,7 @@ @@ -35,7 +36,7 @@
35 </view> 36 </view>
36 <view class="info-row"> 37 <view class="info-row">
37 <text>客户分类</text><text 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 </view> 40 </view>
40 <view class="info-row"> 41 <view class="info-row">
41 <text>登记日期</text><text>{{ item.registerDate || '-' }}</text> 42 <text>登记日期</text><text>{{ item.registerDate || '-' }}</text>
@@ -129,7 +130,7 @@ @@ -129,7 +130,7 @@
129 computed: { 130 computed: {
130 extraCombined() { 131 extraCombined() {
131 return { 132 return {
132 - customerName: this.searchKeywordDebounced || undefined 133 + companyName: this.searchKeywordDebounced || undefined
133 } 134 }
134 } 135 }
135 }, 136 },
@@ -242,7 +243,7 @@ @@ -242,7 +243,7 @@
242 delete params.dateRange 243 delete params.dateRange
243 } 244 }
244 if (this.searchKeywordDebounced) { 245 if (this.searchKeywordDebounced) {
245 - params.customerName = this.searchKeywordDebounced 246 + params.companyName = this.searchKeywordDebounced
246 } 247 }
247 return queryApi(params) 248 return queryApi(params)
248 .then(res => { 249 .then(res => {
@@ -298,7 +299,19 @@ @@ -298,7 +299,19 @@
298 url: '/pages/credit_manage/detail' + query 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,16 +433,8 @@
420 font-size: 24rpx; 433 font-size: 24rpx;
421 padding: 0 14rpx; 434 padding: 0 14rpx;
422 border-radius: 6rpx; 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,9 +466,23 @@
461 padding: 4rpx 12rpx; 466 padding: 4rpx 12rpx;
462 border-radius: 6rpx; 467 border-radius: 6rpx;
463 font-size: 24rpx; 468 font-size: 24rpx;
464 - background: #E3F9E9;  
465 - color: #2BA471;  
466 width: auto; 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