Browse Source

修复bug

xiaohaizhao 1 year ago
parent
commit
a7ea9a3bf0
2 changed files with 26 additions and 3 deletions
  1. 24 1
      packageA/receivables/index.js
  2. 2 2
      utils/Http.js

+ 24 - 1
packageA/receivables/index.js

@@ -162,14 +162,37 @@ Page({
     })
   },
   toDetail(e) {
+    let {
+      item
+    } = e.currentTarget.dataset;
+    let content = JSON.parse(JSON.stringify(this.data.content));
+    content.dataid = item.userid || item.sa_customersid;
     wx.navigateTo({
-      url: '/packageA/receivables/detail?content=' + JSON.stringify(this.data.content),
+      url: '/packageA/receivables/detail?content=' + JSON.stringify(content),
     })
   },
   querytypeChange(e) {
     this.setData({
       "content.querytype": e.detail.value
     });
+    if (e.detail.value == 0) {
+      this.data.table[0] = {
+        title: '部门',
+        width: 330,
+        key: 'depname',
+        fun: 'toDetail'
+      }
+    } else {
+      this.data.table[0] = {
+        title: '客户名称',
+        width: 330,
+        key: 'enterprisename',
+        fun: 'toDetail'
+      }
+    }
+    this.setData({
+      table: this.data.table
+    })
     this.getList(true)
   },
   pointChange(e) {

+ 2 - 2
utils/Http.js

@@ -11,8 +11,8 @@ class HTTP {
         if (this.ENV === 'release') { // 正式版
             this.baseUrl = "https://oms.idcgroup.com.cn:8079";
         } else {
-            // this.baseUrl = "http://61.164.207.46:8000";
-            this.baseUrl = "http://192.168.3.13:8080";
+            this.baseUrl = "http://61.164.207.46:8000";
+            // this.baseUrl = "http://192.168.3.13:8080";
             // this.baseUrl = "https://oms.idcgroup.com.cn:8079";
         }
         console.log("接口地址:", this.baseUrl)