Browse Source

联系人标签表名区分

xiaohaizhao 2 years ago
parent
commit
389e1ff5bc

+ 3 - 1
packageA/project/modules/contacts/add/index.wxml

@@ -1,6 +1,8 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填项' switch='{{fromShowAll}}' bind:callBack='changefromShowAll' />
 <Yl_field id='Form' showAll='{{!fromShowAll}}' form="{{form}}" bind:onConfirm='onConfirm' bind:interrupt='interrupt' />
-
+<view style="height: 130rpx;">
+    
+</view>
 <view class="footer">
     <van-button custom-class='but' disabled='{{disabled}}' bindtap="submit">确定</van-button>
 </view>

+ 1 - 1
packageA/project/modules/contacts/list/index.wxml

@@ -1,5 +1,5 @@
 <view class="item" wx:for="{{list}}" wx:key="changeuserid">
-    <navigator url="/packageA/setclient/modules/contacts/detail/index?contactsid={{item.contactsid}}" class="content">
+    <navigator url="/packageA/setclient/modules/contacts/detail/index?contactsid={{item.contactsid}}&ownertable=sa_project_contacts" class="content">
         <view class="user">
             <view class="portrait">
                 {{item.name[0]}}

+ 1 - 1
packageA/setclient/modules/contacts/add/index.wxml

@@ -1,6 +1,6 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填项' switch='{{fromShowAll}}' bind:callBack='changefromShowAll' />
 <Yl_field id='Form' showAll='{{!fromShowAll}}' form="{{form}}" bind:onConfirm='onConfirm' bind:interrupt='interrupt' />
-
+<view style="height: 140rpx;" />
 <view class="footer">
 	<van-button custom-class='but' disabled='{{disabled}}' bindtap="submit">确定</van-button>
 </view>

+ 6 - 2
packageA/setclient/modules/contacts/detail/index.js

@@ -2,6 +2,7 @@ const _Http = getApp().globalData.http;
 
 Page({
     data: {
+        ownertable: "sys_enterprise_contacts",
         contactsid: 0,
         tabsActive: 0, //tabs 选中项
         tabsList: [{
@@ -13,9 +14,11 @@ Page({
         }],
     },
     onLoad(options) {
+        console.log(options)
         if (options.contactsid) {
             this.setData({
-                contactsid: options.contactsid
+                contactsid: options.contactsid,
+                ownertable: options.ownertable || "sys_enterprise_contacts"
             });
             this.getDetail();
         }
@@ -62,7 +65,7 @@ Page({
                 }, {
                     label: "传真",
                     value: item.fax
-                },  {
+                }, {
                     label: "部门",
                     value: item.depname
                 }, {
@@ -73,6 +76,7 @@ Page({
                     value: item.remarks
                 }]
             });
+            this.getTags()
         })
     },
     //tabs 切换

+ 3 - 3
packageA/setclient/modules/contacts/detail/index.wxml

@@ -8,7 +8,7 @@
                 {{detail.name}}
             </view>
             <view class="tag">
-                <Yl-tags id="Tags" add ownertable='sys_enterprise_contacts' ownerid='{{detail.contactsid}}' />
+                <Yl-tags id="Tags" add ownertable='{{ownertable}}' ownerid='{{detail.contactsid}}' />
             </view>
         </view>
     </view>
@@ -16,7 +16,7 @@
 <!-- 简介 -->
 <Yl_Detail list="{{briefs}}">
     <!-- 团队管理 -->
-    <Yl-group id='Group' slot='bottom' add ownertable='sys_enterprise_contacts' ownerid='{{detail.contactsid}}' />
+    <Yl-group id='Group' slot='bottom' add ownertable='{{ownertable}}' ownerid='{{detail.contactsid}}' />
 </Yl_Detail>
 <view style="height: 20rpx;" />
 <!-- 功能 -->
@@ -25,6 +25,6 @@
         <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示已填信息' switch='{{showAll}}' bind:callBack='onChange' />
         <Yl_ReportForms showAll='{{!showAll}}' list='{{list1}}' />
     </view>
-    <Trace slot='跟进动态' id='Trace' ownertable='sys_enterprise_contacts' ownerid='{{detail.contactsid}}' />
+    <Trace slot='跟进动态' id='Trace' ownertable='{{ownertable}}' ownerid='{{detail.contactsid}}' />
     <view style="height: 140rpx;" />
 </Yl_FunTabs>