xiaohaizhao il y a 1 an
Parent
commit
37c17634de
2 fichiers modifiés avec 10 ajouts et 5 suppressions
  1. 4 1
      packageA/publicCustomer/addAndEditor.js
  2. 6 4
      packageA/setclient/addAndEditor.js

+ 4 - 1
packageA/publicCustomer/addAndEditor.js

@@ -9,6 +9,7 @@ Page({
         isSubmit: false,
         showAll: false,
         oldcontactsid: 0,
+        sys_phonebookid: 0,
         form: [{
             label: "客户(企业)",
             error: false,
@@ -227,6 +228,7 @@ Page({
                     if (confirm) {
                         form[index].value = item.name;
                         that.data.oldcontactsid = item.contactsid
+                        that.data.sys_phonebookid = item.sys_phonebookid
                         if (item.phonenumber.indexOf('-') !== -1) {
                             form[index + 1].value = "1";
                             form[index + 2] = {
@@ -607,6 +609,7 @@ Page({
             "name": data.name,
             "telephone": "",
             "phonenumber": data.isTelephone == 0 ? data.phonenumber || '' : data.telephone1.join("-") || '',
+            sys_phonebookid: this.data.sys_phonebookid || 0,
             oldcontactsid: this.data.oldcontactsid
         }
         _Http.basic({
@@ -621,7 +624,7 @@ Page({
             })
             console.log("新建客户", res)
             if (res.msg != '成功') return wx.showToast({
-                title: res.data,
+                title: res.msg,
                 icon: "none"
             })
             wx.showToast({

+ 6 - 4
packageA/setclient/addAndEditor.js

@@ -9,6 +9,7 @@ Page({
         repetitionList: [],
         isSubmit: false,
         oldcontactsid: 0,
+        sys_phonebookid: 0,
         form: [{
             label: "客户(企业)",
             error: false,
@@ -298,8 +299,8 @@ Page({
                 }) => {
                     if (confirm) {
                         form[index].value = item.name;
-                        console.log(item)
-                        that.data.oldcontactsid = item.contactsid
+                        that.data.oldcontactsid = item.contactsid;
+                        that.data.sys_phonebookid = item.sys_phonebookid;
                         if (item.phonenumber.indexOf('-') !== -1) {
                             form[index + 1].value = "1";
                             form[index + 2] = {
@@ -606,7 +607,8 @@ Page({
             "name": data.name,
             "telephone": "",
             "phonenumber": data.isTelephone == 0 ? data.phonenumber || '' : data.telephone1.join("-") || '',
-            oldcontactsid: this.data.oldcontactsid
+            oldcontactsid: this.data.oldcontactsid,
+            sys_phonebookid: this.data.sys_phonebookid || 0,
         }
         _Http.basic({
             "id": 20221012163902,
@@ -620,7 +622,7 @@ Page({
             })
             console.log("新建客户", res)
             if (res.msg != '成功') return wx.showToast({
-                title: res.data,
+                title: res.msg,
                 icon: "none"
             })
             wx.showToast({