Przeglądaj źródła

查重逻辑修改

xiaohaizhao 3 lat temu
rodzic
commit
c14501d26c

+ 4 - 0
packageA/contract/modules/discount/type/add/index.js

@@ -12,6 +12,10 @@ Page({
             }
             }
         },
         },
     },
     },
+    onSearch({detail}){
+        this.data.content.where.condition = detail;
+        this.getList(true);
+    },
     onLoad(options) {
     onLoad(options) {
         if (options.sa_contractid) this.setData({
         if (options.sa_contractid) this.setData({
             "content.sa_contractid": options.sa_contractid,
             "content.sa_contractid": options.sa_contractid,

+ 3 - 2
packageA/contract/modules/discount/type/add/index.wxml

@@ -1,11 +1,12 @@
+<van-search shape="round" placeholder="请输入搜索关键词" bind:search='onSearch' bind:clear='onSearch' />
+<view style="height: 20rpx;" />
 <van-checkbox-group value="{{ result }}" bind:change="onChange">
 <van-checkbox-group value="{{ result }}" bind:change="onChange">
     <van-cell-group>
     <van-cell-group>
-        <van-cell wx:for="{{ list }}" wx:key="itemclassid" title="{{ item.itemclassname }}" label="{{item.brandname?'品牌:'+item.brandname+' 默认折扣:'+(item.discountrate*100)+'%':'' }}" value-class="value-class" clickable data-item="{{ item }}" bind:click="toggle">
+        <van-cell wx:for="{{ list }}" wx:key="itemclassid" title="{{ item.itemclassfullname }}" label="{{'编号:' + (item.itemclassnum||' --  ') + (item.brandname ? '品牌:' + item.brandname + ' 默认折扣:'+((item.discountrate||1)*100)+'%':'') }}" value-class="value-class" clickable data-item="{{ item }}" bind:click="toggle">
             <van-checkbox name="{{ item.itemclassid }}" />
             <van-checkbox name="{{ item.itemclassid }}" />
         </van-cell>
         </van-cell>
     </van-cell-group>
     </van-cell-group>
 </van-checkbox-group>
 </van-checkbox-group>
-
 <My_empty wx:if="{{list.length==0}}" />
 <My_empty wx:if="{{list.length==0}}" />
 <view style="height: 130rpx;" />
 <view style="height: 130rpx;" />
 <view class="new-footer">
 <view class="new-footer">

+ 255 - 255
packageA/opponent/detail.js

@@ -1,266 +1,266 @@
 const _Http = getApp().globalData.http;
 const _Http = getApp().globalData.http;
 Page({
 Page({
-    data: {
-        isShowTabbar: true, //是否显示底部
-        tabsActive: 1, //tabs 选中项
-        sa_competitorid: 0,
-        detail: {}, //详情数据
-        briefs: [], //简介列表
-        tabsList: [{
-            label: "详细信息",
-            icon: "icon-tabxiangxixinxi1"
-        }, {
-            label: "参与项目",
-            icon: "icon-tabxiangmu"
-        }, {
-            label: "地址管理",
-            icon: "icon-tabdizhi"
-        }, {
-            label: "联系人",
-            icon: "icon-tablianxiren"
-        }, {
-            label: "跟进动态",
-            icon: "icon-tabgenjinjilu"
-        }, {
-            label: "操作记录",
-            icon: "icon-tabcaozuojilu1"
-        }, {
-            label: "附件",
-            icon: "icon-tabfujian1"
-        }, {
-            label: "任务",
-            icon: "icon-tabrenwu"
-        }],
-        list1: [], //基本信息
-        list2: [], //系统信息
-        tabbarList: [{
-            icon: "icon-bianji",
-            label: "编辑"
-        }, {
-            icon: "icon-shanchu",
-            label: "作废"
-        }]
-    },
-    onLoad(options) {
-        this.setData({
-            sa_competitorid: options.id,
-            isAdmin: wx.getStorageSync('auth').wPublicCustomer.options.some(v => v == "admin"), //是否具有管理权限
+  data: {
+    isShowTabbar: true, //是否显示底部
+    tabsActive: 1, //tabs 选中项
+    sa_competitorid: 0,
+    detail: {}, //详情数据
+    briefs: [], //简介列表
+    tabsList: [{
+      label: "详细信息",
+      icon: "icon-tabxiangxixinxi1"
+    }, {
+      label: "参与项目",
+      icon: "icon-tabxiangmu"
+    }, {
+      label: "地址管理",
+      icon: "icon-tabdizhi"
+    }, {
+      label: "联系人",
+      icon: "icon-tablianxiren"
+    }, {
+      label: "跟进动态",
+      icon: "icon-tabgenjinjilu"
+    }, {
+      label: "操作记录",
+      icon: "icon-tabcaozuojilu1"
+    }, {
+      label: "附件",
+      icon: "icon-tabfujian1"
+    }, {
+      label: "任务",
+      icon: "icon-tabrenwu"
+    }],
+    list1: [], //基本信息
+    list2: [], //系统信息
+    tabbarList: [{
+      icon: "icon-bianji",
+      label: "编辑"
+    }, {
+      icon: "icon-shanchu",
+      label: "作废"
+    }]
+  },
+  onLoad(options) {
+    this.setData({
+      sa_competitorid: options.id,
+      isAdmin: wx.getStorageSync('auth').wPublicCustomer.options.some(v => v == "admin"), //是否具有管理权限
+    })
+    this.getDetail();
+  },
+  //详情按钮回调
+  tabbarOnClick({
+    detail
+  }) {
+    let data = this.data.detail;
+    switch (detail.label) {
+      case "跟进":
+        wx.navigateTo({
+          url: `/packageA/setclient/modules/trace/add/index?ownertable=sa_competitor&ownerid=${data.sa_competitorid}`,
+        })
+        break;
+      case "编辑":
+        wx.navigateTo({
+          url: `/packageA/opponent/add?data=${JSON.stringify(data)}`,
         })
         })
-        this.getDetail();
-    },
-    //详情按钮回调
-    tabbarOnClick({
-        detail
-    }) {
-        let data = this.data.detail;
-        switch (detail.label) {
-            case "跟进":
-                wx.navigateTo({
-                    url: `/packageA/setclient/modules/trace/add/index?ownertable=sa_competitor&ownerid=${data.sa_competitorid}`,
-                })
-                break;
-            case "编辑":
-                wx.navigateTo({
-                    url: `/packageA/opponent/add?data=${JSON.stringify(data)}`,
-                })
-                break;
-            case "作废":
-                wx.navigateTo({
-                    url: `/packageA/setclient/delete?item=${JSON.stringify({
+        break;
+      case "作废":
+        wx.navigateTo({
+          url: `/packageA/setclient/delete?item=${JSON.stringify({
                         "sa_competitorids": [this.data.detail.sa_competitorid],
                         "sa_competitorids": [this.data.detail.sa_competitorid],
                         datastatus: 1, //(0:正常;1:作废;2:锁定)
                         datastatus: 1, //(0:正常;1:作废;2:锁定)
                     })}&id=20221018164202`,
                     })}&id=20221018164202`,
-                })
-                break;
-            case "查看重复":
-                _Http.basic({
-                    "id": 20230324132602,
-                    "content": {
-                        "sa_competitorid": data.sa_competitorid,
-                        "enterprisename": data.enterprisename
-                    }
-                }).then(res => {
-                    console.log("查看重复", res)
-                    if (res.msg != '成功') return wx.showToast({
-                        title: res.msg,
-                        icon: "none"
-                    });
-                    this.setData({
-                        repetitionList: res.data,
-                        repetitionShow: true
-                    })
-                })
-                break;
-            default:
-                console.log(detail)
-                break;
-        }
-    },
-    /* 前去重复项详情 */
-    toRepDetail(e) {
-        const {
-            item
-        } = e.currentTarget.dataset;
-        wx.navigateTo({
-            url: '/packageA/opponent/detail?id=' + item.sa_competitorid,
-        })
-        this.repClose()
-    },
-    /* 关闭查重 */
-    repClose() {
-        this.setData({
-            repetitionShow: false
         })
         })
-    },
-    /* 获取详情 */
-    getDetail() {
-        /* 基本信息 */
+        break;
+      case "查看重复":
         _Http.basic({
         _Http.basic({
-            "id": 20221019105802,
-            "content": {
-                nocache: true,
-                sa_competitorid: this.data.sa_competitorid
-            },
+          "id": 20230324132602,
+          "content": {
+            "sa_competitorid": data.sa_competitorid,
+            "enterprisename": data.enterprisename
+          }
         }).then(res => {
         }).then(res => {
-            console.log("竞争对手详情", res)
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            })
-            /* 摘要信息 */
-            let briefs = [{
-                label: "品牌",
-                value: res.data.brandname
-            }, {
-                label: "优势信息",
-                value: res.data.advantage
-            }, {
-                label: "劣势信息",
-                value: res.data.inferiority
-            }];
-            /* 基本信息 */
-            let list1 = [{
-                label: "名称",
-                value: res.data.enterprisename
-            }, {
-                label: "品牌",
-                value: res.data.brandname
-            }, {
-                label: "优势信息",
-                value: res.data.advantage
-            }, {
-                label: "劣势信息",
-                value: res.data.inferiority
-            }, {
-                label: "备注信息",
-                value: res.data.remarks
-            }];
-            /* 系统信息 */
-            let list2 = [{
-                label: "创建人",
-                value: res.data.createby
-            }, {
-                label: "创建时间",
-                value: res.data.createdate
-            }, {
-                label: "最近编辑人",
-                value: res.data.changeby
-            }, {
-                label: "最近编辑时间",
-                value: res.data.changedate
-            }];
-            this.setData({
-                detail: res.data,
-                briefs,
-                list1,
-                list2,
-                isShowTabbar: this.data.isAdmin || res.data.createuserid == wx.getStorageSync('userMsg').userid
-            });
-            //获取标签
-            this.getTags();
-            this.partialRenewal();
-        });
-    },
-    //tabs 切换
-    tabsChange({
-        detail
-    }) {
-        this.setData({
-            tabsActive: detail
-        });
-        this.partialRenewal();
-    },
-    //局部数据更新 tabs
-    partialRenewal(init = false) {
-        let id = this.data.detail.sa_competitorid;
-        let model = '';
-        let name = this.data.tabsList[this.data.tabsActive].label;
-        switch (name) {
-            case "任务":
-                model = "#Work"
-                break;
-            case "参与项目":
-                model = "#Project"
-                break;
-            case "跟进动态":
-                model = "#Trace"
-                break;
-            case "操作记录":
-                model = "#Record"
-                break;
-            case "附件":
-                model = "#Files"
-                break;
-            case "地址管理":
-                id = this.data.detail.sys_enterpriseid;
-                model = "#Address"
-                break;
-            case "联系人":
-                id = this.data.detail.sys_enterpriseid;
-                model = "#Contacts"
-                break;
-        };
-        if (model) {
-            // 确定好模块ID total = null 是第一次加载 加载数据
-            // init是新增或修改需要清数据
-            let Component = this.selectComponent(model);
-            const {
-                total,
-                pageNumber,
-                pageTotal
-            } = Component.data.content;
-            if (total == null || init) {
-                console.log(1)
-                Component.getList(id, init);
-            } else if (pageNumber <= pageTotal) {
-                console.log(2)
-                Component.getList(id, false);
-            } else {
-                //用来判断 在搜索页面修改,与tabs选项不一致 但是切换到该选项 重置数据
-            }
-        }
-    },
-    //更新标签
-    getTags() {
-        this.selectComponent("#Tags").getTags();
-    },
-    onReachBottom() {
-        this.partialRenewal();
-    },
-    onShareAppMessage() {},
-    //标签获取到列表后
-    onGetList({
-        detail
-    }) {
+          console.log("查看重复", res)
+          if (res.msg != '成功') return wx.showToast({
+            title: res.msg,
+            icon: "none"
+          });
+          this.setData({
+            repetitionList: res.data,
+            repetitionShow: true
+          })
+        })
+        break;
+      default:
         console.log(detail)
         console.log(detail)
-        if (detail.data.systemtag.includes("疑似重复")) {
-            this.data.tabbarList.push({
-                icon: "icon-a-shouyejingangquhehuoren",
-                label: "查看重复"
-            });
-            this.setData({
-                tabbarList: this.data.tabbarList
-            })
-        }
-    },
+        break;
+    }
+  },
+  /* 前去重复项详情 */
+  toRepDetail(e) {
+    const {
+      item
+    } = e.currentTarget.dataset;
+    wx.navigateTo({
+      url: '/packageA/opponent/detail?id=' + item.sa_competitorid,
+    })
+    this.repClose()
+  },
+  /* 关闭查重 */
+  repClose() {
+    this.setData({
+      repetitionShow: false
+    })
+  },
+  /* 获取详情 */
+  getDetail() {
+    /* 基本信息 */
+    _Http.basic({
+      "id": 20221019105802,
+      "content": {
+        nocache: true,
+        sa_competitorid: this.data.sa_competitorid
+      },
+    }).then(res => {
+      console.log("竞争对手详情", res)
+      if (res.msg != '成功') return wx.showToast({
+        title: res.data,
+        icon: "none"
+      })
+      /* 摘要信息 */
+      let briefs = [{
+        label: "品牌",
+        value: res.data.brandname
+      }, {
+        label: "优势信息",
+        value: res.data.advantage
+      }, {
+        label: "劣势信息",
+        value: res.data.inferiority
+      }];
+      /* 基本信息 */
+      let list1 = [{
+        label: "名称",
+        value: res.data.enterprisename
+      }, {
+        label: "品牌",
+        value: res.data.brandname
+      }, {
+        label: "优势信息",
+        value: res.data.advantage
+      }, {
+        label: "劣势信息",
+        value: res.data.inferiority
+      }, {
+        label: "备注信息",
+        value: res.data.remarks
+      }];
+      /* 系统信息 */
+      let list2 = [{
+        label: "创建人",
+        value: res.data.createby
+      }, {
+        label: "创建时间",
+        value: res.data.createdate
+      }, {
+        label: "最近编辑人",
+        value: res.data.changeby
+      }, {
+        label: "最近编辑时间",
+        value: res.data.changedate
+      }];
+      this.setData({
+        detail: res.data,
+        briefs,
+        list1,
+        list2,
+        isShowTabbar: this.data.isAdmin || res.data.createuserid == wx.getStorageSync('userMsg').userid
+      });
+      //获取标签
+      this.getTags();
+      this.partialRenewal();
+    });
+  },
+  //tabs 切换
+  tabsChange({
+    detail
+  }) {
+    this.setData({
+      tabsActive: detail
+    });
+    this.partialRenewal();
+  },
+  //局部数据更新 tabs
+  partialRenewal(init = false) {
+    let id = this.data.detail.sa_competitorid;
+    let model = '';
+    let name = this.data.tabsList[this.data.tabsActive].label;
+    switch (name) {
+      case "任务":
+        model = "#Work"
+        break;
+      case "参与项目":
+        model = "#Project"
+        break;
+      case "跟进动态":
+        model = "#Trace"
+        break;
+      case "操作记录":
+        model = "#Record"
+        break;
+      case "附件":
+        model = "#Files"
+        break;
+      case "地址管理":
+        id = this.data.detail.sys_enterpriseid;
+        model = "#Address"
+        break;
+      case "联系人":
+        id = this.data.detail.sys_enterpriseid;
+        model = "#Contacts"
+        break;
+    };
+    if (model) {
+      // 确定好模块ID total = null 是第一次加载 加载数据
+      // init是新增或修改需要清数据
+      let Component = this.selectComponent(model);
+      const {
+        total,
+        pageNumber,
+        pageTotal
+      } = Component.data.content;
+      if (total == null || init) {
+        console.log(1)
+        Component.getList(id, init);
+      } else if (pageNumber <= pageTotal) {
+        console.log(2)
+        Component.getList(id, false);
+      } else {
+        //用来判断 在搜索页面修改,与tabs选项不一致 但是切换到该选项 重置数据
+      }
+    }
+  },
+  //更新标签
+  getTags() {
+    this.selectComponent("#Tags").getTags();
+  },
+  onReachBottom() {
+    this.partialRenewal();
+  },
+  onShareAppMessage() {},
+  //标签获取到列表后
+  onGetList({
+    detail
+  }) {
+    console.log(detail)
+    if (detail.data.systemtag.includes("疑似重复") && this.data.options.find(v => v == 'viewRepetition')) {
+      this.data.tabbarList.push({
+        icon: "icon-a-shouyejingangquhehuoren",
+        label: "查看重复"
+      });
+      this.setData({
+        tabbarList: this.data.tabbarList
+      })
+    }
+  },
 })
 })

+ 1 - 0
packageA/project/addAndEdit.wxml

@@ -24,5 +24,6 @@
         <view class="exp">领域:{{item.tradefield||' --'}}</view>
         <view class="exp">领域:{{item.tradefield||' --'}}</view>
         <view class="exp">品牌:{{item.brandname||' --'}}</view>
         <view class="exp">品牌:{{item.brandname||' --'}}</view>
         <view class="exp">负责人:{{item.leader[0].name||' --'}}</view>
         <view class="exp">负责人:{{item.leader[0].name||' --'}}</view>
+        <view class="exp">手机号:{{item.phonenumber||" --"}}</view>
     </navigator>
     </navigator>
 </van-popup>
 </van-popup>

+ 44 - 4
packageA/project/detail.js

@@ -135,6 +135,12 @@ Page({
                 label: "结束"
                 label: "结束"
             })
             })
         }
         }
+
+        if (this.data.options.find(v => v == 'viewRepetition')) tabbarList.push({
+            icon: "icon-a-shouyejingangquhehuoren",
+            label: "查看重复"
+        });
+
         data.signamount_due = CNY(data.signamount_due);
         data.signamount_due = CNY(data.signamount_due);
         this.setData({
         this.setData({
             isLeader,
             isLeader,
@@ -374,11 +380,41 @@ Page({
                         })}&radio=true&principal=true`,
                         })}&radio=true&principal=true`,
                 })
                 })
                 break;
                 break;
+            case "查看重复":
+                _Http.basic({
+                    "id": 20221208184202,
+                    "content": {
+                        sa_projectid: data.sa_projectid,
+                        projectname: data.projectname,
+                        address: data.address,
+                        pageSize: 999
+                    }
+                }).then(res => {
+                    console.log("查看重复", res)
+                    if (res.msg != '成功') return wx.showToast({
+                        title: res.msg,
+                        icon: "none"
+                    });
+                    if (res.data.length == 0) return wx.showToast({
+                        title: '未查询到重复数据',
+                        icon: "none"
+                    });
+                    this.setData({
+                        repetitionList: res.data,
+                        repetitionShow: true
+                    })
+                })
+                break;
             default:
             default:
                 console.log(detail)
                 console.log(detail)
                 break;
                 break;
         }
         }
     },
     },
+    repClose() {
+        this.setData({
+            repetitionShow: false
+        })
+    },
     /* 1提交报备,2报备审核,3报备驳回(退回) */
     /* 1提交报备,2报备审核,3报备驳回(退回) */
     handleReport(type) {
     handleReport(type) {
         _Http.basic({
         _Http.basic({
@@ -483,10 +519,14 @@ Page({
         this.selectComponent("#Group").getList();
         this.selectComponent("#Group").getList();
     },
     },
     /* tag更新列表 */
     /* tag更新列表 */
-    onGetList(e) {
-        if (e.detail.data.systemtag.includes('报备中')) this.setData({
-            tabbarList: this.data.tabbarList.filter(v => v.label != '提交报备')
-        })
+    onGetList({
+        detail
+    }) {
+        if (detail.data.systemtag.includes('报备中')) {
+            this.setData({
+                tabbarList: this.data.tabbarList.filter(v => v.label != '提交报备')
+            })
+        }
     },
     },
     onUnload() {
     onUnload() {
         const page = getCurrentPages().find(v => v.__route__ == 'packageA/project/index');
         const page = getCurrentPages().find(v => v.__route__ == 'packageA/project/index');

+ 61 - 0
packageA/project/detail.scss

@@ -12,4 +12,65 @@
         color: #333333;
         color: #333333;
         margin-bottom: 16rpx;
         margin-bottom: 16rpx;
     }
     }
+}
+
+
+.popup {
+    .title {
+        position: sticky;
+        height: 80rpx;
+        line-height: 80rpx;
+        width: 100%;
+        text-align: center;
+        border-bottom: 1rpx solid #ddd;
+        font-weight: 600;
+        color: #333;
+        top: 0;
+        background-color: #fff;
+
+        .icon {
+            position: absolute;
+            right: 28rpx;
+            top: 22rpx;
+            color: #999;
+        }
+    }
+
+    .enterprise {
+        width: 100%;
+        box-sizing: border-box;
+        padding-left: 30rpx;
+        padding-right: 10rpx;
+        padding-bottom: 10rpx;
+        border-bottom: 1rpx solid #ddd;
+        margin-top: 10rpx;
+
+        .tag-box {
+            margin-top: 10rpx;
+
+            .tag {
+                height: 40rpx;
+                font-size: 20rpx;
+                font-family: PingFang SC-Regular, PingFang SC;
+                padding: 0 12rpx;
+                margin-right: 8rpx;
+            }
+        }
+
+        &_title {
+            line-height: 40rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Bold, PingFang SC;
+            font-weight: bold;
+            color: #333333;
+        }
+
+        .exp {
+            line-height: 34rpx;
+            font-size: 24rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #666666;
+            margin-top: 8rpx;
+        }
+    }
 }
 }

+ 44 - 21
packageA/project/detail.wxml

@@ -1,32 +1,55 @@
 <view class="header">
 <view class="header">
-    <view class="title">{{detail.projectname}}</view>
-    <Yl-tags id="Tags" add ownertable='sa_project' ownerid='{{sa_projectid}}' bindonGetList='onGetList' />
+  <view class="title">{{detail.projectname}}</view>
+  <Yl-tags id="Tags" add ownertable='sa_project' ownerid='{{sa_projectid}}' bindonGetList='onGetList' />
 </view>
 </view>
 <!-- 简介 -->
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
 <Yl_Detail list="{{briefs}}">
-    <view slot='bottom'>
-        <Yl-group id='Group' add ownertable='sa_project' ownerid='{{sa_projectid}}' />
-        <TaskTabs id='TaskTabs' disabled='{{isAdmin||isLeader}}' sa_projectid='{{sa_projectid}}' sa_projstagetempid='{{detail.sa_projstagetempid}}' bindchangeCallBack="taskTabsChange" />
-    </view>
+  <view slot='bottom'>
+    <Yl-group id='Group' add ownertable='sa_project' ownerid='{{sa_projectid}}' />
+    <TaskTabs id='TaskTabs' disabled='{{isAdmin||isLeader}}' sa_projectid='{{sa_projectid}}' sa_projstagetempid='{{detail.sa_projstagetempid}}' bindchangeCallBack="taskTabsChange" />
+  </view>
 </Yl_Detail>
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <view style="height: 20rpx;" />
 
 
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
-    <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
-    <Trace slot='跟进动态' id='Trace' ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
-    <Work slot='任务' id='Work' ownertable='sa_project' ownerid='{{detail.sa_projectid}}' disabled="{{isAdmin||isLeader}}" />
-    <Task slot='项目评估' id='Task' disabled="{{per.query(options,'assess')||isAdmin||isLeader}}" />
-    <Contract slot='合同' id='Contract' disabled="{{per.query(options,'assess')||isAdmin||isLeader}}" />
-    <Treaty slot='关联客户' id='Treaty' disabled="{{per.query(options,'client')||isAdmin||isLeader}}" />
-    <Product slot='产品配置单' id='Product' signamount_due="{{detail.signamount_due}}" discountrate="{{detail.discountrate * 100}}" disabled="{{(per.query(options,'product')||isAdmin||isLeader )&&detail.status=='跟进中'}}" />
-    <Contacts slot='联系人' id='Contacts' disabled="{{per.query(options,'contacts')||isAdmin||isLeader}}" />
-    <Opponent slot='竞争对手' id='Opponent' disabled="{{per.query(options,'opposites')||isAdmin||isLeader}}" />
-    <Offers slot='报价单' id='Offers' disabled="{{per.query(options,'offer')||isAdmin||isLeader}}" />
-    <Record slot='操作记录' id="Record" ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
-    <Files slot='附件' id="Files" ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
-    <Clue slot='关联线索' id="Clue" />
-    <view style="height: 140rpx;" />
+  <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
+  <Trace slot='跟进动态' id='Trace' ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
+  <Work slot='任务' id='Work' ownertable='sa_project' ownerid='{{detail.sa_projectid}}' disabled="{{isAdmin||isLeader}}" />
+  <Task slot='项目评估' id='Task' disabled="{{per.query(options,'assess')||isAdmin||isLeader}}" />
+  <Contract slot='合同' id='Contract' disabled="{{per.query(options,'assess')||isAdmin||isLeader}}" />
+  <Treaty slot='关联客户' id='Treaty' disabled="{{per.query(options,'client')||isAdmin||isLeader}}" />
+  <Product slot='产品配置单' id='Product' signamount_due="{{detail.signamount_due}}" discountrate="{{detail.discountrate * 100}}" disabled="{{(per.query(options,'product')||isAdmin||isLeader )&&detail.status=='跟进中'}}" />
+  <Contacts slot='联系人' id='Contacts' disabled="{{per.query(options,'contacts')||isAdmin||isLeader}}" />
+  <Opponent slot='竞争对手' id='Opponent' disabled="{{per.query(options,'opposites')||isAdmin||isLeader}}" />
+  <Offers slot='报价单' id='Offers' disabled="{{per.query(options,'offer')||isAdmin||isLeader}}" />
+  <Record slot='操作记录' id="Record" ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
+  <Files slot='附件' id="Files" ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
+  <Clue slot='关联线索' id="Clue" />
+  <view style="height: 140rpx;" />
 </Yl_FunTabs>
 </Yl_FunTabs>
 <!-- 底部 -->
 <!-- 底部 -->
 <Yl_Tabbar list='{{tabbarList}}' bind:callback="tabbarOnClick" />
 <Yl_Tabbar list='{{tabbarList}}' bind:callback="tabbarOnClick" />
-<wxs src='../../utils/wxmlQueryPer.wxs' module="per" />
+<wxs src='../../utils/wxmlQueryPer.wxs' module="per" />
+
+<!-- 查重 -->
+<van-popup show="{{ repetitionShow }}" custom-class='popup' round position="bottom" custom-style="height: 100%;" bind:close="repClose">
+  <view class="title">
+    查重
+    <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="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>{{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>{{tag}}</van-tag>
+    </view>
+    <view class="exp">项目状态:{{item.status ||' --'}}</view>
+    <view class="exp">项目编号:{{item.projectnum ||' --'}}</view>
+    <view class="exp">项目地址:{{item.address ||' --'}}</view>
+    <view class="exp">项目类型:{{item.projecttype ||' --'}}</view>
+    <view class="exp">领域:{{item.tradefield||' --'}}</view>
+    <view class="exp">品牌:{{item.brandname||' --'}}</view>
+    <view class="exp">负责人:{{item.leader[0].name||' --'}}</view>
+    <view class="exp">手机号:{{item.phonenumber||" --"}}</view>
+  </navigator>
+</van-popup>

+ 1 - 0
packageA/publicCustomer/addAndEditor.wxml

@@ -26,6 +26,7 @@
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
+        <view class="exp">手机号:{{item.phonenumber||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
     </navigator>
     </navigator>

+ 8 - 14
packageA/publicCustomer/detail.js

@@ -227,6 +227,10 @@ Page({
                         title: res.msg,
                         title: res.msg,
                         icon: "none"
                         icon: "none"
                     });
                     });
+                    if (res.data.length == 0) return wx.showToast({
+                        title: '未查询到重复数据',
+                        icon: "none"
+                    });
                     this.setData({
                     this.setData({
                         repetitionList: res.data,
                         repetitionList: res.data,
                         repetitionShow: true
                         repetitionShow: true
@@ -391,6 +395,10 @@ Page({
             icon: "icon-a-tuiguangsucailaxinliang",
             icon: "icon-a-tuiguangsucailaxinliang",
             label: "分配"
             label: "分配"
         })
         })
+        if (this.data.options.find(v => v == 'viewRepetition')) tabbarList.push({
+            icon: "icon-a-shouyejingangquhehuoren",
+            label: "查看重复"
+        });
         this.setData({
         this.setData({
             detail: res.data,
             detail: res.data,
             briefs,
             briefs,
@@ -431,20 +439,6 @@ Page({
     getTags() {
     getTags() {
         this.selectComponent("#Tags").getTags();
         this.selectComponent("#Tags").getTags();
     },
     },
-    //标签获取到列表后
-    onGetList({
-        detail
-    }) {
-        if (detail.data.systemtag.includes("疑似重复")) {
-            this.data.tabbarList.push({
-                icon: "icon-a-shouyejingangquhehuoren",
-                label: "查看重复"
-            });
-            this.setData({
-                tabbarList: this.data.tabbarList
-            })
-        }
-    },
     onReachBottom() {
     onReachBottom() {
         this.partialRenewal();
         this.partialRenewal();
     }
     }

+ 1 - 0
packageA/publicCustomer/detail.wxml

@@ -60,6 +60,7 @@
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
+        <view class="exp">手机号:{{item.phonenumber||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
     </navigator>
     </navigator>

+ 1 - 0
packageA/setclient/addAndEditor.wxml

@@ -26,6 +26,7 @@
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
+        <view class="exp">手机号:{{item.phonenumber||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
     </navigator>
     </navigator>

+ 8 - 14
packageA/setclient/detail.js

@@ -164,6 +164,10 @@ Page({
                         title: res.msg,
                         title: res.msg,
                         icon: "none"
                         icon: "none"
                     });
                     });
+                    if (res.data.length == 0) return wx.showToast({
+                        title: '未查询到重复数据',
+                        icon: "none"
+                    });
                     this.setData({
                     this.setData({
                         repetitionList: res.data,
                         repetitionList: res.data,
                         repetitionShow: true
                         repetitionShow: true
@@ -427,6 +431,10 @@ Page({
                 label: "退回"
                 label: "退回"
             })
             })
         }
         }
+        if (this.data.options.find(v => v == 'viewRepetition')) tabbarList.push({
+            icon: "icon-a-shouyejingangquhehuoren",
+            label: "查看重复"
+        });
         this.setData({
         this.setData({
             tabbarList,
             tabbarList,
             isLeader
             isLeader
@@ -464,20 +472,6 @@ Page({
     getTags() {
     getTags() {
         this.selectComponent("#Tags").getTags();
         this.selectComponent("#Tags").getTags();
     },
     },
-    //标签获取到列表后
-    onGetList({
-        detail
-    }) {
-        if (detail.data.systemtag.includes("疑似重复")) {
-            this.data.tabbarList.push({
-                icon: "icon-a-shouyejingangquhehuoren",
-                label: "查看重复"
-            });
-            this.setData({
-                tabbarList: this.data.tabbarList
-            })
-        }
-    },
     //更新团队成员
     //更新团队成员
     getGroup() {
     getGroup() {
         this.selectComponent("#Group").getList();
         this.selectComponent("#Group").getList();

+ 1 - 0
packageA/setclient/detail.wxml

@@ -61,6 +61,7 @@
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">企业税号:{{item.taxno||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">客户类型:{{item.type||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
         <view class="exp">负责人:{{item.leader[0].name||" --"}}</view>
+        <view class="exp">手机号:{{item.phonenumber||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">成交状态:{{item.tradingstatus||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
         <view class="exp">最近跟进时间:{{item.followdate||" --"}}</view>
     </navigator>
     </navigator>