Bladeren bron

信息修改

1002884655 3 jaren geleden
bovenliggende
commit
47da8145a6
4 gewijzigde bestanden met toevoegingen van 32 en 22 verwijderingen
  1. 2
    2
      config/dev.js
  2. 8
    1
      project.config.json
  3. 16
    15
      src/pages/mine/addCustomer/index.jsx
  4. 6
    4
      src/subpackages/pages/marketing/changeVisit/index.jsx

+ 2
- 2
config/dev.js Bestand weergeven

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"https://www.newhousehold.cn"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"https://www.newhousehold.cn"',
8 8
     // HOST: '"http://127.0.0.1:8567"',
9 9
     // WSS_HOST: '"wss://www.newhousehold.cn"',
10 10
     WSS_HOST: '"wss://xlk.njyz.tech"',

+ 8
- 1
project.config.json Bestand weergeven

@@ -2,7 +2,7 @@
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "miniapp",
4 4
 	"description": "",
5
-	"appid": "wxc96058d57e77f373",
5
+	"appid": "wxe44244d1a5ea3364",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,
@@ -84,6 +84,13 @@
84 84
 					"pathName": "pages/index/activityDetail/index",
85 85
 					"query": "id=5e1e226d71d7774ba8166440aed78a11&eventType=dymic",
86 86
 					"scene": null
87
+				},
88
+				{
89
+					"id": 4,
90
+					"name": "pages/index/buildingDetail/index",
91
+					"pathName": "pages/index/buildingDetail/index",
92
+					"query": "id=bf5d766943cfcc6b5814317340c8eefc",
93
+					"scene": null
87 94
 				}
88 95
 			]
89 96
 		}

+ 16
- 15
src/pages/mine/addCustomer/index.jsx Bestand weergeven

@@ -22,7 +22,7 @@ const sexDicts = [
22 22
 export default withLayout((props) => {
23 23
   const { router, person } = props
24 24
   const { personId, personType } = person
25
-  const { buildingId : originBuiding } = router.params
25
+  const { buildingId: originBuiding } = router.params
26 26
 
27 27
   const [loading, setLoading] = useState(false)
28 28
   const [buildingId, setBuildingId] = useState(null)
@@ -41,7 +41,7 @@ export default withLayout((props) => {
41 41
 
42 42
   useEffect(() => {
43 43
     console.log('------originBuiding------>', originBuiding)
44
-    if(originBuiding) {
44
+    if (originBuiding) {
45 45
       setBuildingId(originBuiding)
46 46
     }
47 47
   }, [originBuiding])
@@ -63,7 +63,7 @@ export default withLayout((props) => {
63 63
       Taro.showToast({ title: '请填写正确的客户电话', icon: 'none' })
64 64
       return false
65 65
     }
66
-    if (buildingId === null && personType !== ROLE_CODE.CONSULTANT && personType !== ROLE_CODE.CUSTOMER) {
66
+    if (buildingId === null && personType !== ROLE_CODE.CUSTOMER) {
67 67
       Taro.showToast({ title: '请选择客户的意向楼盘', icon: 'none' })
68 68
       return false
69 69
     }
@@ -77,6 +77,7 @@ export default withLayout((props) => {
77 77
         phone: FormData.phone, // 电话
78 78
         sex: SexId, // 性别
79 79
         describe: FormData.describe, // 描述
80
+        buildingId,
80 81
       } :
81 82
       {
82 83
         ...FormData,
@@ -84,24 +85,24 @@ export default withLayout((props) => {
84 85
         buildingId,
85 86
         realtyConsultant: CardId
86 87
       };
87
-    
88
+
88 89
     if (!preSubmit(payload)) {
89 90
       return;
90 91
     }
91 92
 
92 93
     setLoading(true)
93 94
     let url = null
94
-    if(personType === ROLE_CODE.CONSULTANT) {
95
+    if (personType === ROLE_CODE.CONSULTANT) {
95 96
       url = API_REPORT_CUETOMER
96
-    } else if(personType === ROLE_CODE.CHANNEL_AGENT) {
97
+    } else if (personType === ROLE_CODE.CHANNEL_AGENT) {
97 98
       url = API_CHANNEL_REPORT
98
-    } else if(personType === ROLE_CODE.CUSTOMER) {
99
+    } else if (personType === ROLE_CODE.CUSTOMER) {
99 100
       url = API_USER_ADD_CUSTOMER
100 101
     }
101 102
     fetch({ url, method: 'post', payload }).then(() => {
102 103
       setLoading(false)
103 104
       Taro.showToast({ title: '操作成功', icon: 'none' })
104
-      
105
+
105 106
       const t = setTimeout(() => {
106 107
         Taro.navigateBack({ delta: 1 })
107 108
         clearTimeout(t)
@@ -149,16 +150,16 @@ export default withLayout((props) => {
149 150
             {/* <text className='iconfont icon-jiantoudown'></text> */}
150 151
           </view>
151 152
 
153
+          <text>意向楼盘</text>
154
+          <view className='FormLine flex-h'>
155
+            <view className='flex-item'>
156
+              <BuildingPicker change={BuildingChange} value={buildingId} type={personType} />
157
+            </view>
158
+          </view>
159
+
152 160
           {
153 161
             personType !== ROLE_CODE.CONSULTANT &&
154 162
             <Block>
155
-              <text>意向楼盘</text>
156
-              <view className='FormLine flex-h'>
157
-                <view className='flex-item'>
158
-                  <BuildingPicker change={BuildingChange} value={buildingId} type={personType} />
159
-                </view>
160
-              </view>
161
-
162 163
               <text>内场接待(选填)</text>
163 164
               <view className='FormLine flex-h'>
164 165
                 <view className='flex-item'>

+ 6
- 4
src/subpackages/pages/marketing/changeVisit/index.jsx Bestand weergeven

@@ -67,15 +67,15 @@ export default withLayout((props) => {
67 67
   useEffect(() => {
68 68
     fetch({ url: `${API_CUSTOMER_DETAILINFO}/${id}`, method: 'get' }).then((res) => {
69 69
       if(CurrentStatusId - 0 === 3) {
70
-        setFormData({ ...FormData, ...res?.customerPreparatory })
70
+        setFormData({ ...FormData, ...res?.customerPreparatory, realtyConsultant: res.customerPreparatory?.realtyConsultant })
71 71
       }
72 72
       setChannelCustomerId(res?.channelCustomer?.channelCustomerId)
73
-      setRenChouData({ ...RenChouData, ...res?.customerPreparatory })
73
+      setRenChouData({ ...RenChouData, ...res?.customerPreparatory, realtyConsultant: res.customerPreparatory?.realtyConsultant })
74 74
       if((res.customerSignatory || []).length) {
75 75
         let customerSignatory = res.customerSignatory[0]
76 76
         customerSignatory.dividendsPer = customerSignatory.dividendsName.substring(customerSignatory.dividendsName.indexOf('|') + 1, customerSignatory.dividendsName.indexOf('%'))
77 77
         customerSignatory.dividendsName = customerSignatory.dividendsName.substring(0, customerSignatory.dividendsName.indexOf('|'))
78
-        setQianYueData({...QianYueData, ...customerSignatory})
78
+        setQianYueData({...QianYueData, ...customerSignatory, realtyConsultant: (res.customerSignatory|| []).length ? res.customerSignatory[0].realtyConsultant : null})
79 79
         HouseTypeList.map((item) => {
80 80
           if(item.apartmentId === res.customerSignatory[0].houseType) {
81 81
             setCurrentRoomTypeId(item.apartmentId)
@@ -83,8 +83,10 @@ export default withLayout((props) => {
83 83
         })
84 84
         setSuccessDate(res.customerSignatory[0].successDate.substring(0, 10))
85 85
       }
86
+      const ConsultantId = CurrentStatusId === 3 ? res.customerPreparatory?.realtyConsultant : (res.customerSignatory|| []).length ? res.customerSignatory[0].realtyConsultant : null
87
+      console.log(`ConsultantId is`, ConsultantId)
86 88
       ConsultantList.map((item) => {
87
-        if(item.id === res.customerPreparatory.realtyConsultant) {
89
+        if(item.id === ConsultantId) {
88 90
           setCurrnetConsultant(item)
89 91
         }
90 92
       })