Parcourir la source

项目商机进入添加合同 改变经销商/客户选择范围

xiaohaizhao il y a 2 ans
Parent
commit
2c28f33f70

+ 17 - 1
packageA/contract/add/type2/index.js

@@ -161,7 +161,23 @@ Page({
                 }),
                 "content.sa_contractid": data.sa_contractid
             })
-        }
+        };
+        //项目进入 修改经销商选择范围
+        if (options.sa_projectid) this.setData({
+            'form[1].params': {
+                "id": 20220920083901,
+                "content": {
+                    nocache: true,
+                    "pageNumber": 1,
+                    "pageSize": 20,
+                    "where": {
+                        "condition": "",
+                        "type": "14",
+                        "sa_projectid": options.sa_projectid
+                    }
+                }
+            }
+        });
     },
     /* 打断处理form */
     interrupt(e) {

+ 43 - 25
packageA/contract/add/type3/index.js

@@ -128,31 +128,31 @@ Page({
         if (options.data) {
             let data = JSON.parse(options.data);
             console.log(data)
-            if (data.sa_projectid) this.data.form.splice(2, 0, {
-                label: "项目",
-                error: false,
-                errMsg: "",
-                type: "route",
-                url: "/packageA/select/project/select",
-                value: data.project,
-                params: {
-                    "id": 20221201090802,
-                    "content": {
-                        nocache: true,
-                        sys_enterpriseid: data.sys_enterpriseid[1][0],
-                        type: 1, //1直销 2经销 3居间
-                        where: {
-                            condition: "",
-                        }
-                    }
-                },
-                query: "&radio=true",
-                placeholder: "选择项目",
-                interrupt: true,
-                valueName: "sa_projectid",
-                checking: "base",
-                required: true
-            })
+            /*  if (data.sa_projectid) this.data.form.splice(2, 0, {
+                 label: "项目",
+                 error: false,
+                 errMsg: "",
+                 type: "route",
+                 url: "/packageA/select/project/select",
+                 value: data.project,
+                 params: {
+                     "id": 20221201090802,
+                     "content": {
+                         nocache: true,
+                         sys_enterpriseid: data.sys_enterpriseid[1][0],
+                         type: 1, //1直销 2经销 3居间
+                         where: {
+                             condition: "",
+                         }
+                     }
+                 },
+                 query: "&radio=true",
+                 placeholder: "选择项目",
+                 interrupt: true,
+                 valueName: "sa_projectid",
+                 checking: "base",
+                 required: true
+             }) */
             this.setData({
                 disabled: false,
                 form: this.data.form.map(v => {
@@ -163,7 +163,25 @@ Page({
                 "content.sa_contractid": data.sa_contractid
             })
         }
+        //项目进入 修改客户选择范围
+        if (options.sa_projectid) this.setData({
+            'form[1].params': {
+                "id": 20220920083901,
+                "content": {
+                    nocache: true,
+                    "pageNumber": 1,
+                    "pageSize": 20,
+                    "where": {
+                        "condition": "",
+                        "type": "13",
+                        "sa_projectid": options.sa_projectid
+                    }
+                }
+            }
+        });
     },
+
+
     /* 打断处理form */
     interrupt(e) {
         let {

+ 50 - 32
packageA/contract/add/type4/index.js

@@ -180,40 +180,58 @@ Page({
                 "content.sa_contractid": data.sa_contractid
             })
         }
-        /*     if (options.sa_projectid) {
-                this.setData({
-                    "form[2]": {
-                        label: "项目合同",
-                        error: false,
-                        errMsg: "",
-                        type: "route",
-                        url: "/packageA/select/contract/select",
-                        radio: true,
-                        value: "",
-                        params: {
-                            "id": 20221217145402,
-                            "content": {
-                                nocache: true,
-                                "pageNumber": 1,
-                                "pageSize": 20,
-                                "where": {
-                                    "condition": "",
-                                    sa_projectid: options.sa_projectid
-                                }
-                            }
-                        },
-                        placeholder: "选择项目合同",
-                        valueName: "ascription_contractid",
-                        checking: "base",
-                        required: true
+
+        //项目进入 修改客户选择范围
+        if (options.sa_projectid) this.setData({
+            'form[1].params': {
+                "id": 20220920083901,
+                "content": {
+                    nocache: true,
+                    "pageNumber": 1,
+                    "pageSize": 20,
+                    "where": {
+                        nocache: true,
+                        "condition": "",
+                        "type": "14",
+                        "sa_projectid": options.sa_projectid
                     }
-                })
+                }
             }
-            if (options.project) {
-                this.setData({
-                    "form[3].value": JSON.parse(options.project)
-                })
-            }; */
+        });
+        /*  if (options.sa_projectid) {
+             this.setData({
+                 "form[2]": {
+                     label: "项目合同",
+                     error: false,
+                     errMsg: "",
+                     type: "route",
+                     url: "/packageA/select/contract/select",
+                     radio: true,
+                     value: "",
+                     params: {
+                         "id": 20221217145402,
+                         "content": {
+                             nocache: true,
+                             "pageNumber": 1,
+                             "pageSize": 20,
+                             "where": {
+                                 "condition": "",
+                                 sa_projectid: options.sa_projectid
+                             }
+                         }
+                     },
+                     placeholder: "选择项目合同",
+                     valueName: "ascription_contractid",
+                     checking: "base",
+                     required: true
+                 }
+             })
+         }
+         if (options.project) {
+             this.setData({
+                 "form[3].value": JSON.parse(options.project)
+             })
+         }; */
     },
     /* 打断处理form */
     interrupt(e) {