浏览代码

业务员创建按套先查企业在选择合同

xiaohaizhao 9 月之前
父节点
当前提交
dc775cc256
共有 1 个文件被更改,包括 55 次插入16 次删除
  1. 55 16
      packageA/borrow/index.js

+ 55 - 16
packageA/borrow/index.js

@@ -72,23 +72,62 @@ Page({
     }) {
         this.onCancel();
         if (detail.name == '按借用合同借用') {
-            wx.navigateTo({
-                url: `/select/contract/index?params=${JSON.stringify({
-                    "id": 20230114092502,
-                    "content": {
-                        nocache: true,
-                        "pageNumber": 1,
-                        "pageTotal": 1,
-                        "total": null,
-                        "pageSize": 20,
-                        typemx:"合同借用",
-                        "where": {
-                            "condition": ""
+
+            let usertype = wx.getStorageSync('userMsg').usertype;
+            if (usertype == 1) {
+                wx.navigateTo({
+                    url: `/select/agent/index?params=${JSON.stringify({
+                                "id": 20220920083901,
+                                "content": {
+                                    nocache:true,
+                                    "where": {
+                                            "condition": "",
+                                            "type":9,
+                                    }
+                                }
+                        })}&radio=true`,
+                })
+                getApp().globalData.handleSelect = function ({
+                    item
+                }) {
+                    console.log(item)
+                    wx.redirectTo({
+                        url: `/select/contract/index?params=${JSON.stringify({
+                            "id": 20230114092502,
+                            "content": {
+                                nocache: true,
+                                "pageNumber": 1,
+                                "sys_enterpriseid":item.sys_enterpriseid,
+                                "pageTotal": 1,
+                                "total": null,
+                                "pageSize": 20,
+                                "where": {
+                                    "condition": ""
+                                }
+                            }
+                        })}&radio=false`
+                    })
+                    getApp().globalData.handleSelect = this.handleCreated.bind(this);
+                }
+            } else {
+                wx.navigateTo({
+                    url: `/select/contract/index?params=${JSON.stringify({
+                        "id": 20230114092502,
+                        "content": {
+                            nocache: true,
+                            "pageNumber": 1,
+                            "pageTotal": 1,
+                            "total": null,
+                            "pageSize": 20,
+                            typemx:"合同借用",
+                            "where": {
+                                "condition": ""
+                            }
                         }
-                    }
-                })}&radio=false`
-            })
-            getApp().globalData.handleSelect = this.handleCreated.bind(this);
+                    })}&radio=false`
+                })
+                getApp().globalData.handleSelect = this.handleCreated.bind(this);
+            }
         } else {
             if (this.data.userrole == '业务员') {
                 wx.navigateTo({