Forráskód Böngészése

客户联系人详情

zhaoxiaohai 2 éve
szülő
commit
d5b003d226

+ 54 - 61
packageA/setclient/modules/contacts/detail/index.js

@@ -1,66 +1,59 @@
-// packageA/setclient/modules/contacts/detail/index.js
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        tabsActive: 0, //tabs 选中项
+        tabsList: [{
+            label: "详细信息",
+            num: 132
+        }, {
+            label: "跟进动态",
+            num: 132
+        }, {
+            label: "地址",
+            num: 132
+        }],
     },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
     onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
-    }
+        if (options.data) {
+            let item = JSON.parse(options.data)
+            this.setData({
+                detail: item,
+                briefs: [{
+                    label: "手机号码",
+                    value: item.phonenumber
+                }, {
+                    label: "性别",
+                    value: item.sex
+                }, {
+                    label: "生日",
+                    value: item.birthday
+                }, {
+                    label: "最近跟进时间",
+                    value: ""
+                }],
+                list1: [{
+                    label: "手机号码",
+                    value: item.phonenumber
+                }, {
+                    label: "性别",
+                    value: item.sex
+                }, {
+                    label: "生日",
+                    value: item.birthday
+                }, {
+                    label: "邮箱",
+                    value: item.email
+                }, {
+                    label: "部门",
+                    value: item.depname
+                }, {
+                    label: "职位",
+                    value: item.position
+                }, {
+                    label: "备注",
+                    value: item.remarks
+                }]
+            })
+        }
+    },
+    onShareAppMessage() {}
 })

+ 4 - 1
packageA/setclient/modules/contacts/detail/index.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
+    "usingComponents": {
+        "Preview": "../../preview/index"
+    },
+    "navigationBarTitleText": "联系人详情"
 }

+ 37 - 1
packageA/setclient/modules/contacts/detail/index.scss

@@ -1 +1,37 @@
-/* packageA/setclient/modules/contacts/detail/index.wxss */
+.box {
+    width: 100vw;
+    background-color: #ffffff;
+    box-sizing: border-box;
+    padding: 20rpx 0 0rpx 30rpx;
+
+    .head {
+        display: flex;
+
+        .portrait {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            width: 96rpx;
+            height: 96rpx;
+            background: #3874F6;
+            border-radius: 50%;
+            font-size: 28rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #FFFFFF;
+            margin-right: 20rpx;
+            flex-shrink: 0;
+        }
+
+        .content {
+            .title {
+                font-size: 30rpx;
+                font-family: PingFang SC-Regular, PingFang SC;
+                color: #333333;
+            }
+
+            .tag {
+                margin-top: 16rpx;
+            }
+        }
+    }
+}

+ 28 - 2
packageA/setclient/modules/contacts/detail/index.wxml

@@ -1,2 +1,28 @@
-<!--packageA/setclient/modules/contacts/detail/index.wxml-->
-<text>packageA/setclient/modules/contacts/detail/index.wxml</text>
+<view class="box">
+    <view class="head">
+        <view class="portrait">
+            {{detail.name[0]}}
+        </view>
+        <view class="content">
+            <view class="title">
+                {{detail.name}}
+            </view>
+            <view class="tag">
+                <Yl-tags id="Tags" add ownertable='sa_customers' ownerid='{{detail.sa_customersid}}' />
+            </view>
+        </view>
+    </view>
+</view>
+<!-- 简介 -->
+<Yl_Detail list="{{briefs}}">
+    <!-- 团队管理 -->
+    <Yl-group id='Group' slot='bottom' add ownertable='sa_customers' ownerid='{{detail.sa_customersid}}' />
+</Yl_Detail>
+
+<!-- 功能 -->
+<Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
+    <Trace slot='跟进动态' id='Trace' ownertable='sa_customers' ownerid='{{detail.sa_customersid}}' />
+    <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
+    <Address slot='客户地址' id='Address' />
+    <view style="height: 140rpx;" />
+</Yl_FunTabs>