소스 검색

工商查询

zhaoxiaohai 3 년 전
부모
커밋
583c4e3577

+ 47 - 22
packageA/publicClue/addClue.js

@@ -13,6 +13,7 @@ Page({
             placeholder: "客户(企业)",
             valueName: "enterprisename",
             checking: "base",
+            slot: "info",
             required: false
         }, {
             label: "联系人",
@@ -53,21 +54,21 @@ Page({
             model: "#Form",
             value: "",
             radio: true,
-            disabled:false,
+            disabled: false,
             params: {
-            "id":20221101095102,
-            "content": {
-                'isAll':0,
-                "pageNumber":1,
-                "pageSize":999999999,
-                "where": {
-                'condition':''
+                "id": 20221101095102,
+                "content": {
+                    'isAll': 0,
+                    "pageNumber": 1,
+                    "pageSize": 999999999,
+                    "where": {
+                        'condition': ''
+                    }
                 }
-            }
             },
             placeholder: "选择市场活动",
             valueName: "campaign_name",
-            idName:'sat_campaignid',
+            idName: 'sat_campaignid',
             checking: "base",
             required: false
         }, {
@@ -103,7 +104,7 @@ Page({
         }],
         "content": {
             "sat_orderclueid": 0,
-            "enterprisename":"",
+            "enterprisename": "",
             "name": "",
             "phonenumber": "",
             "province": "",
@@ -112,8 +113,8 @@ Page({
             "address": "",
             "notes": "",
             "cluesource": "",
-            "sat_campaignid":0,//活动id,当活动id大于0是默认业务员创建
-            "isprivate":0//0表示公海,1表示私域
+            "sat_campaignid": 0, //活动id,当活动id大于0是默认业务员创建
+            "isprivate": 0 //0表示公海,1表示私域
         },
         disabled: true
     },
@@ -152,12 +153,36 @@ Page({
                     }
                     return v
                 }),
-                'form[0].value':data.enterprisename_customer,
-                'content.sat_orderclueid':data.sat_orderclueid,
+                'form[0].value': data.enterprisename_customer,
+                'content.sat_orderclueid': data.sat_orderclueid,
                 'content.sat_campaignid': data.sat_campaignid
             })
         }
     },
+    introduce({
+        detail
+    }) {
+        let item = detail;
+        this.setData({
+            [`form[0].value`]: item.companyName,
+            [`form[5].value`]: item.address,
+            [`form[3].value`]: [item.regProvince, item.regCity, item.regArea],
+        })
+    },
+    queryClient() {
+        let data = this.selectComponent("#Form").query();
+        if (data.enterprisename == '') {
+            wx.showToast({
+                title: `您还未填写企业名称`,
+                icon: "none"
+            });
+        } else {
+            this.setData({
+                form: this.selectComponent("#Form").data.form,
+            })
+            this.selectComponent("#Info").queryClient(data.enterprisename)
+        }
+    },
     submit() {
         let content = {
             ...this.data.content,
@@ -173,9 +198,9 @@ Page({
             content.county = content.province[2]
             content.province = content.province[0]
         }
-        
+
         _Http.basic({
-            "id":"20221205162402",
+            "id": "20221205162402",
             content
         }).then(res => {
             console.log("添加线索", res)
@@ -187,13 +212,13 @@ Page({
             setTimeout(() => {
                 wx.navigateBack();
                 getCurrentPages().forEach(v => {
-                    console.log(v,'路径');
-                    if(v.__route__=='packageA/publicClue/detail'){
+                    console.log(v, '路径');
+                    if (v.__route__ == 'packageA/publicClue/detail') {
                         v.getDetail();
-                    }else if(v.__route__=='packageA/publicClue/index'){
+                    } else if (v.__route__ == 'packageA/publicClue/index') {
                         v.getList(true);
-                    } else if(v.__route__=='packageA/activity/detail') {
-                        v.selectComponent('#clue').getList(this.data.content.sat_campaignid,true)
+                    } else if (v.__route__ == 'packageA/activity/detail') {
+                        v.selectComponent('#clue').getList(this.data.content.sat_campaignid, true)
                     }
                 })
             }, 300)

+ 3 - 1
packageA/publicClue/addClue.json

@@ -1,4 +1,6 @@
 {
-    "usingComponents": {},
+    "usingComponents": {
+        "information": "../setclient/modules/information/index"
+    },
     "navigationBarTitleText": "添加线索"
 }

+ 5 - 1
packageA/publicClue/addClue.wxml

@@ -1,5 +1,9 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
-<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt" />
+<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt">
+    <view slot='info'>
+        <information id="Info" catchtap='queryClient' catch:callback='introduce' />
+    </view>
+</Yl_field>
 <view style="height: 100rpx;" />
 <view class="new-footer">
     <van-button custom-class='new-submit' disabled='{{disabled}}' bindclick='submit'>提交</van-button>

+ 34 - 9
packageA/saleClue/addClue.js

@@ -13,6 +13,7 @@ Page({
             placeholder: "客户(企业)",
             valueName: "enterprisename",
             checking: "base",
+            slot: "info",
             required: false
         }, {
             label: "联系人",
@@ -54,19 +55,19 @@ Page({
             value: "",
             radio: true,
             params: {
-            "id":20221101095102,
-            "content": {
-                'isAll':0,
-                "pageNumber":1,
-                "pageSize":999999999,
-                "where": {
-                'condition':''
+                "id": 20221101095102,
+                "content": {
+                    'isAll': 0,
+                    "pageNumber": 1,
+                    "pageSize": 999999999,
+                    "where": {
+                        'condition': ''
+                    }
                 }
-            }
             },
             placeholder: "选择市场活动",
             valueName: "campaign_name",
-            idName:'sat_campaignid',
+            idName: 'sat_campaignid',
             checking: "base",
             required: false
         }, {
@@ -147,6 +148,30 @@ Page({
             console.log(this.data.form);
         }
     },
+    introduce({
+        detail
+    }) {
+        let item = detail;
+        this.setData({
+            [`form[0].value`]: item.companyName,
+            [`form[5].value`]: item.address,
+            [`form[3].value`]: [item.regProvince, item.regCity, item.regArea],
+        })
+    },
+    queryClient() {
+        let data = this.selectComponent("#Form").query();
+        if (data.enterprisename == '') {
+            wx.showToast({
+                title: `您还未填写企业名称`,
+                icon: "none"
+            });
+        } else {
+            this.setData({
+                form: this.selectComponent("#Form").data.form,
+            })
+            this.selectComponent("#Info").queryClient(data.enterprisename)
+        }
+    },
     submit() {
         let content = {
             ...this.data.content,

+ 3 - 1
packageA/saleClue/addClue.json

@@ -1,4 +1,6 @@
 {
-    "usingComponents": {},
+    "usingComponents": {
+        "information": "../setclient/modules/information/index"
+    },
     "navigationBarTitleText": "添加线索"
 }

+ 5 - 1
packageA/saleClue/addClue.wxml

@@ -1,5 +1,9 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
-<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt" />
+<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt">
+    <view slot='info'>
+        <information id="Info" catchtap='queryClient' catch:callback='introduce' />
+    </view>
+</Yl_field>
 <view style="height: 100rpx;" />
 <view class="new-footer">
     <van-button custom-class='new-submit' disabled='{{disabled}}' bindclick='submit'>提交</van-button>

+ 2 - 1
packageA/setclient/detail.wxml

@@ -24,7 +24,8 @@
     <Trace slot='跟进动态' id='Trace' ownertable='sa_customers' ownerid='{{detail.sa_customersid}}' />
     <Work slot='任务' id='Work' ownertable='sa_customers' ownerid='{{detail.sa_customersid}}' disabled="{{isAdmin||isLeader}}" />
     <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
-    <Clue slot='线索' id='Clue' disabled="{{per.query(options,'clue')||isAdmin||isLeader}}" />
+    <Clue slot='线索' id='Clue' disabled="{{false}}" />
+    <!-- {{per.query(options,'clue')||isAdmin||isLeader}} -->
     <Address slot='客户地址' id='Address' disabled="{{per.query(options,'address')||isAdmin||isLeader}}" />
     <Contacts slot='联系人' id='Contacts' disabled="{{per.query(options,'contact')||isAdmin||isLeader}}" />
     <Offers slot='报价单' id='Offers' disabled="{{per.query(options,'offer')||isAdmin||isLeader}}" />