Browse Source

项目名称查重修改

xiaohaizhao 11 months ago
parent
commit
c9ac2b9f5c

+ 22 - 1
packageA/project/addAndEdit.js

@@ -234,6 +234,7 @@ Page({
                     }
                     return v
                 })
+
             });
         } else {
             //查询默认项目规模单位
@@ -385,6 +386,16 @@ Page({
                         ...acc,
                         ...item
                     }), {});
+                    v.projectname = v.projectname.split('').map(text => {
+                        let projectname = v.chars.projectname.join("") || ''
+                        return projectname.includes(text) ? {
+                            text,
+                            color: "red"
+                        } : {
+                            text,
+                            color: "#666666"
+                        }
+                    })
                     return v
                 }),
             })
@@ -455,11 +466,21 @@ Page({
                 })
                 this.setData({
                     repetitionShow: true,
-                    repetitionList: query.data.map(v => {
+                    repetitionList: res.data.map(v => {
                         v.chars = v.chars.reduce((acc, item) => ({
                             ...acc,
                             ...item
                         }), {});
+                        v.projectname = v.projectname.split('').map(text => {
+                            let projectname = v.chars.projectname.join("") || ''
+                            return projectname.includes(text) ? {
+                                text,
+                                color: "red"
+                            } : {
+                                text,
+                                color: "#666666"
+                            }
+                        })
                         return v
                     }),
                     isSubmit: true

+ 2 - 1
packageA/project/addAndEdit.wxml

@@ -12,7 +12,7 @@
         <van-icon custom-class='icon' size='40rpx' name="cross" bindtap="repClose" />
     </view>
     <navigator url="#" class="enterprise" wx:for="{{repetitionList}}" wx:key="sa_projectid">
-        <view class="enterprise_title">{{item.projectname}}</view>
+        <view class="enterprise_title"><text wx:for="{{item.projectname}}" wx:key="i" wx:for-item="it" wx:for-index="i" style="color: {{it.color}};">{{it.text}}</text></view>
         <view class="tag-box">
             <van-tag custom-class='tag' wx:for="{{item.tag_sys}}" wx:key="index" wx:for-item='tag' color='#3874f6' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
             <van-tag custom-class='tag' wx:for="{{item.tag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
@@ -26,5 +26,6 @@
         <view class="exp" style="color: {{item.chars['leader'] ? 'red' : '#666666'}}">{{language['负责人']||'负责人'}}:{{item.leader[0].name||' --'}}</view>
         <view class="exp" style="color: {{item.chars['phonenumber'] ? 'red' : '#666666'}}">{{language['手机号']||'手机号'}}:{{item.phonenumber||" --"}}</view>
     </navigator>
+    <view style="height: 160rpx;" />
 </van-popup>
 <projectname id="projectname" siteid='{{siteid}}' />

+ 10 - 0
packageA/project/detail.js

@@ -407,6 +407,16 @@ Page({
                                     ...acc,
                                     ...item
                                 }), {});
+                                v.projectname = v.projectname.split('').map(text => {
+                                    let projectname = v.chars.projectname.join("") || ''
+                                    return projectname.includes(text) ? {
+                                        text,
+                                        color: "red"
+                                    } : {
+                                        text,
+                                        color: "#666666"
+                                    }
+                                })
                                 return v
                             }),
                             repetitionShow: true,

+ 1 - 1
packageA/project/detail.wxml

@@ -38,7 +38,7 @@
         <van-icon custom-class='icon' size='40rpx' name="cross" bindtap="repClose" />
     </view>
     <navigator url="/packageA/project/detail?id={{item.sa_projectid}}" class="enterprise" wx:for="{{repetitionList}}" wx:key="sa_projectid">
-        <view class="enterprise_title">{{item.projectname}}</view>
+        <view class="enterprise_title"><text wx:for="{{item.projectname}}" wx:key="i" wx:for-item="it" wx:for-index="i" style="color: {{it.color}};">{{it.text}}</text></view>
         <view class="tag-box">
             <van-tag custom-class='tag' wx:for="{{item.tag_sys}}" wx:key="index" wx:for-item='tag' color='#3874f6' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
             <van-tag custom-class='tag' wx:for="{{item.tag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>

+ 10 - 0
packageA/project/modules/projectname/index.js

@@ -36,6 +36,16 @@ Component({
                             ...acc,
                             ...item
                         }), {});
+                        v.projectname = v.projectname.split('').map(text => {
+                            let projectname = v.chars.projectname.join("") || ''
+                            return projectname.includes(text) ? {
+                                text,
+                                color: "red"
+                            } : {
+                                text,
+                                color: "#666666"
+                            }
+                        })
                         return v
                     }),
                     show: this.data.siteid == 'HY' ? false : res.data.length != 0

+ 1 - 1
packageA/project/modules/projectname/index.wxml

@@ -5,7 +5,7 @@
         <van-icon custom-class='icon' size='40rpx' name="cross" bindtap="repClose" />
     </view>
     <navigator url="#" class="enterprise" wx:for="{{repetitionList}}" wx:key="sa_projectid">
-        <view class="enterprise_title">{{item.projectname}}</view>
+        <view class="enterprise_title"><text wx:for="{{item.projectname}}" wx:key="i" wx:for-item="it" wx:for-index="i" style="color: {{it.color}};">{{it.text}}</text></view>
         <view class="tag-box">
             <van-tag custom-class='tag' wx:for="{{item.tag_sys}}" wx:key="index" wx:for-item='tag' color='#3874f6' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
             <van-tag custom-class='tag' wx:for="{{item.tag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>

+ 2 - 2
packageA/publicCustomer/detail.wxml

@@ -53,7 +53,7 @@
         <van-icon custom-class='icon' size='40rpx' name="cross" bindtap="repClose" />
     </view>
     <navigator url="#" class="enterprise" wx:for="{{repetitionList}}" wx:key="sys_enterpriseid" data-item="{{item}}" bindtap="toRepDetail">
-        <view class="enterprise_title"  style="color: {{item.chars['enterprisename'] ? 'red' : '#666666'}}">{{item.enterprisename||" --"}}</view>
+        <view class="enterprise_title" style="color: {{item.chars['enterprisename'] ? 'red' : '#666666'}}">{{item.enterprisename||" --"}}</view>
         <view class="tag-box">
             <van-tag custom-class='tag' wx:for="{{item.tag_sys}}" wx:key="index" wx:for-item='tag' color='#3874f6' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
             <van-tag custom-class='tag' wx:for="{{item.tag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
@@ -65,7 +65,7 @@
         <view class="exp" style="color: {{item.chars['phonenumber'] ? 'red' : '#666666'}}">{{language['手机号']||'手机号'}}:{{item.phonenumber||" --"}}</view>
         <view class="exp" style="color: {{item.chars['tradingstatus'] ? 'red' : '#666666'}}">{{language['成交状态']||'成交状态'}}:{{item.tradingstatus||" --"}}</view>
         <view class="exp" style="color: {{item.chars['followdate'] ? 'red' : '#666666'}}">{{language['最近跟进时间']||'最近跟进时间'}}:{{item.followdate||" --"}}</view>
-        <view class="exp" style="color: {{item.chars['systemapp'] ? 'red' : '#666666'}}">{{language['归属应用']||'归属应用'}}:{{item.systemapp||" --"}}</view>
+        <view class="exp" style="color: {{item.chars['systemapp'] ? 'red' : '#666666'}}">{{language['归属应用']||'归属应用'}}:{{item.systemapp||" --"}}
             <block wx:if="{{item.systemapp=='回收站'}}">
                 <icon style="padding-left:10rpx;" type="warn" size="11" color='red' />
                 <text style="color: red;margin-left: 2rpx;">{{language['当前重复客户归属回收站,请联系管理处理!']||'当前重复客户归属回收站,请联系管理处理!'}}</text>

+ 22 - 2
packageA/saleClue/change.js

@@ -362,8 +362,18 @@ Page({
                         ...acc,
                         ...item
                     }), {});
+                    v.projectname = v.projectname.split('').map(text => {
+                        let projectname = v.chars.projectname.join("") || ''
+                        return projectname.includes(text) ? {
+                            text,
+                            color: "red"
+                        } : {
+                            text,
+                            color: "#666666"
+                        }
+                    })
                     return v
-                })
+                }),
             })
         }
     },
@@ -425,11 +435,21 @@ Page({
                 })
                 this.setData({
                     repetitionShow: true,
-                    repetitionList: query.data.map(v => {
+                    repetitionList: res.data.map(v => {
                         v.chars = v.chars.reduce((acc, item) => ({
                             ...acc,
                             ...item
                         }), {});
+                        v.projectname = v.projectname.split('').map(text => {
+                            let projectname = v.chars.projectname.join("") || ''
+                            return projectname.includes(text) ? {
+                                text,
+                                color: "red"
+                            } : {
+                                text,
+                                color: "#666666"
+                            }
+                        })
                         return v
                     }),
                     isSubmit: true

+ 1 - 1
packageA/saleClue/change.wxml

@@ -13,7 +13,7 @@
         <van-icon custom-class='icon' size='40rpx' name="cross" bindtap="repClose" />
     </view>
     <navigator url="#" class="enterprise" wx:for="{{repetitionList}}" wx:key="sa_projectid">
-        <view class="enterprise_title">{{language[item.projectname]||item.projectname}}</view>
+        <view class="enterprise_title"><text wx:for="{{item.projectname}}" wx:key="i" wx:for-item="it" wx:for-index="i" style="color: {{it.color}};">{{it.text}}</text></view>
         <view class="tag-box">
             <van-tag custom-class='tag' wx:for="{{item.tag_sys}}" wx:key="index" wx:for-item='tag' color='#3874f6' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
             <van-tag custom-class='tag' wx:for="{{item.tag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>

+ 1 - 1
packageA/setclient/detail.wxml

@@ -66,7 +66,7 @@
         <view class="exp" style="color: {{item.chars['phonenumber'] ? 'red' : '#666666'}}">{{language['手机号']||'手机号'}}:{{item.phonenumber||" --"}}</view>
         <view class="exp" style="color: {{item.chars['tradingstatus'] ? 'red' : '#666666'}}">{{language['成交状态']||'成交状态'}}:{{item.tradingstatus||" --"}}</view>
         <view class="exp" style="color: {{item.chars['followdate'] ? 'red' : '#666666'}}">{{language['最近跟进时间']||'最近跟进时间'}}:{{item.followdate||" --"}}</view>
-        <view class="exp" style="color: {{item.chars['systemapp'] ? 'red' : '#666666'}}">{{language['归属应用']||'归属应用'}}:{{item.systemapp||" --"}}</view>
+        <view class="exp" style="color: {{item.chars['systemapp'] ? 'red' : '#666666'}}">{{language['归属应用']||'归属应用'}}:{{item.systemapp||" --"}}
             <block wx:if="{{item.systemapp=='回收站'}}">
                 <icon style="padding-left:10rpx;" type="warn" size="11" color='red' />
                 <text style="color: red;margin-left: 2rpx;">{{language['当前重复客户归属回收站,请联系管理处理!']||'当前重复客户归属回收站,请联系管理处理!'}}</text>