zhaoxiaohai пре 3 година
родитељ
комит
638d48b676

+ 7 - 10
packageA/project/detail.js

@@ -63,17 +63,11 @@ Page({
                     label: "项目地址",
                     value: res.data.province + res.data.city + res.data.county + res.data.address
                 }, {
-                    label: "项目类型",
-                    value: res.data.projecttype
-                }, {
-                    label: "负责人",
-                    value: res.data.name
-                }, {
-                    label: "当前项目阶段",
-                    value: res.data.stagename
+                    label: "项目等级",
+                    value: res.data.grade
                 }, {
-                    label: "赢率",
-                    value: res.data.winrate
+                    label: "项目预算",
+                    value: res.data.budgetary
                 }, {
                     label: "最近跟进时间",
                     value: res.data.followdate
@@ -87,6 +81,9 @@ Page({
                 }, {
                     label: "项目类型",
                     value: res.data.projecttype
+                }, {
+                    label: "当前项目阶段",
+                    value: res.data.stagename
                 }, {
                     label: "省市县",
                     value: res.data.province ? res.data.province + res.data.city + res.data.county : ''

+ 1 - 0
packageA/project/detail.scss

@@ -2,6 +2,7 @@
     background-color: #fff;
     padding: 20rpx 30rpx 0rpx;
     box-sizing: border-box;
+    margin-bottom: -16rpx;
 
     .title {
         height: 40rpx;

+ 9 - 2
packageA/project/modules/contacts/list/index.scss

@@ -32,6 +32,7 @@
                 flex: 1;
 
                 .title {
+                    width: 100%;
                     height: 42rpx;
                     line-height: 42rpx;
                     font-size: 30rpx;
@@ -39,7 +40,7 @@
                     color: #333333;
 
                     text {
-                        margin-left: 20rpx;
+                        margin-left: 10rpx;
                         font-size: 24rpx;
                         font-family: PingFang SC-Regular, PingFang SC;
                         color: #999999;
@@ -62,7 +63,7 @@
         justify-content: space-between;
         align-items: center;
         width: 100%;
-        height: 80rpx;
+        height: 60rpx;
 
         .icon-but {
             padding-right: 30rpx;
@@ -79,4 +80,10 @@
             }
         }
     }
+}
+
+.line-1 {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
 }

+ 3 - 2
packageA/project/modules/contacts/list/index.wxml

@@ -5,8 +5,8 @@
                 {{item.name[0]}}
             </view>
             <view class="right">
-                <view class="title">
-                    {{item.name}}<text>{{item.phonenumber}}</text>
+                <view class="title line-1">
+                    {{item.name}}<text>{{item.phonenumber}}</text><text>{{item.email}}</text>
                 </view>
                 <view class="exp" style="margin-top: 10rpx;">{{item.enterprisename}} <text>{{item.position}}</text></view>
             </view>
@@ -17,6 +17,7 @@
         <view class="icon-but" bindtap="handleItem">
             <navigator url="#" data-item="{{item}}" data-name="call" class="iconfont icon-bodadianhua" />
             <navigator url="#" data-item="{{item}}" data-name="edit" class="iconfont icon-bianji" />
+            <navigator url="#" data-item="{{item}}" data-name="change" class="iconfont icon-dibu-biangengchengjiaozhuangtai" />
             <navigator url="#" data-item="{{item}}" data-name="delete" class="iconfont icon-shanchu" />
         </view>
     </view>

+ 4 - 3
packageA/project/modules/treaty/add/index.js

@@ -83,13 +83,13 @@ Page({
                 title: res.data,
                 icon: "none"
             })
-            this.getTags(res.data.map(v => v.sa_customersid));
             this.setData({
                 'content.pageNumber': res.pageNumber + 1,
                 'content.pageTotal': res.pageTotal,
                 'content.total': res.total,
                 list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
             })
+            this.getTags();
         })
     },
     /* 开始搜索 */
@@ -110,7 +110,9 @@ Page({
         this.getList(true);
     },
     /* 获取标签 */
-    getTags(ownerids = []) {
+    getTags() {
+        let list = this.data.list,
+            ownerids = list.map(v => v.sa_customersid);
         _Http.basic({
             "id": 20221018102001,
             "content": {
@@ -120,7 +122,6 @@ Page({
         }).then(res => {
             console.log("标签", res)
             if (res.msg != '成功') return;
-            let list = this.data.list;
             for (let key in res.data) {
                 let index = list.findIndex(v => v.sa_customersid == key);
                 if (index != -1) list[index].tags = res.data[key]

+ 7 - 13
packageA/project/modules/treaty/index.js

@@ -35,7 +35,6 @@ Component({
                     title: res.data,
                     icon: "none"
                 })
-                this.getTags(res.data.map(v => v.sa_customersid));
                 this.setData({
                     list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
                     "content.pageNumber": res.pageNumber + 1,
@@ -44,10 +43,13 @@ Component({
                     "content.total": res.total,
                     sa_projectid: id
                 })
+                this.getTags();
             })
         },
         /* 获取列表标签 */
-        getTags(ownerids = []) {
+        getTags() {
+            let list = this.data.list,
+                ownerids = list.map(v => v.sa_customersid);
             _Http.basic({
                 "id": 20221018102001,
                 "content": {
@@ -56,7 +58,6 @@ Component({
                 }
             }).then(res => {
                 console.log("标签", res)
-                let list = this.data.list;
                 for (let key in res.data) {
                     let index = list.findIndex(v => v.sa_customersid == key);
                     if (index != -1) list[index].tags = res.data[key]
@@ -66,22 +67,15 @@ Component({
                 })
             })
         },
-        /* 去搜索 */
-        toSearch() {
-            wx.navigateTo({
-                url: '/packageA/project/modules/treaty/search?data=' + JSON.stringify(this.data.content),
-            })
-        },
         fastCallBack({
             detail
         }) {
-            console.log(detail.name, detail.item)
             const that = this;
             switch (detail.name) {
                 case 'delete':
                     wx.showModal({
                         title: '提示',
-                        content: `是否确认取消关联"${detail.item.enterprisename}"?`,
+                        content: `是否确认删除"${detail.item.enterprisename}"?`,
                         complete: ({
                             confirm
                         }) => {
@@ -100,15 +94,15 @@ Component({
                                     'content.total': that.data.content.total - 1
                                 });
                                 wx.showToast({
-                                    title: `已取消关联"${detail.item.enterprisename}"`,
+                                    title: `已删除"${detail.item.enterprisename}"`,
                                     icon: "none"
                                 })
                             })
                         }
                     })
                     break;
-
                 default:
+                    console.log(detail.name)
                     break;
             }
         }

+ 1 - 1
packageA/project/modules/treaty/index.json

@@ -1,6 +1,6 @@
 {
     "component": true,
     "usingComponents": {
-        "List": "../../../setclient/modules/list/index"
+        "List": "./list/index"
     }
 }

+ 1 - 4
packageA/project/modules/treaty/index.wxml

@@ -1,12 +1,9 @@
 <view class="head">
     <view class="count">总共{{content.total}}个</view>
     <view class="expand">
-        <navigator url="#" class="but" bindtap="toSearch">
-            <van-icon name="search" />
-        </navigator>
         <navigator url="/packageA/project/modules/treaty/add/index?sa_projectid={{sa_projectid}}" class="but">
             <van-icon name="plus" />
         </navigator>
     </view>
 </view>
-<List list='{{list}}' fast bindfastCallBack='fastCallBack' />
+<List list='{{list}}' bindfastCallBack='fastCallBack' />