1002884655 před 3 roky
rodič
revize
47da8145a6

+ 2
- 2
config/dev.js Zobrazit soubor

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
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
     // HOST: '"http://127.0.0.1:8567"',
8
     // HOST: '"http://127.0.0.1:8567"',
9
     // WSS_HOST: '"wss://www.newhousehold.cn"',
9
     // WSS_HOST: '"wss://www.newhousehold.cn"',
10
     WSS_HOST: '"wss://xlk.njyz.tech"',
10
     WSS_HOST: '"wss://xlk.njyz.tech"',

+ 8
- 1
project.config.json Zobrazit soubor

2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "miniapp",
3
 	"projectname": "miniapp",
4
 	"description": "",
4
 	"description": "",
5
-	"appid": "wxc96058d57e77f373",
5
+	"appid": "wxe44244d1a5ea3364",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,
84
 					"pathName": "pages/index/activityDetail/index",
84
 					"pathName": "pages/index/activityDetail/index",
85
 					"query": "id=5e1e226d71d7774ba8166440aed78a11&eventType=dymic",
85
 					"query": "id=5e1e226d71d7774ba8166440aed78a11&eventType=dymic",
86
 					"scene": null
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 Zobrazit soubor

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

+ 6
- 4
src/subpackages/pages/marketing/changeVisit/index.jsx Zobrazit soubor

67
   useEffect(() => {
67
   useEffect(() => {
68
     fetch({ url: `${API_CUSTOMER_DETAILINFO}/${id}`, method: 'get' }).then((res) => {
68
     fetch({ url: `${API_CUSTOMER_DETAILINFO}/${id}`, method: 'get' }).then((res) => {
69
       if(CurrentStatusId - 0 === 3) {
69
       if(CurrentStatusId - 0 === 3) {
70
-        setFormData({ ...FormData, ...res?.customerPreparatory })
70
+        setFormData({ ...FormData, ...res?.customerPreparatory, realtyConsultant: res.customerPreparatory?.realtyConsultant })
71
       }
71
       }
72
       setChannelCustomerId(res?.channelCustomer?.channelCustomerId)
72
       setChannelCustomerId(res?.channelCustomer?.channelCustomerId)
73
-      setRenChouData({ ...RenChouData, ...res?.customerPreparatory })
73
+      setRenChouData({ ...RenChouData, ...res?.customerPreparatory, realtyConsultant: res.customerPreparatory?.realtyConsultant })
74
       if((res.customerSignatory || []).length) {
74
       if((res.customerSignatory || []).length) {
75
         let customerSignatory = res.customerSignatory[0]
75
         let customerSignatory = res.customerSignatory[0]
76
         customerSignatory.dividendsPer = customerSignatory.dividendsName.substring(customerSignatory.dividendsName.indexOf('|') + 1, customerSignatory.dividendsName.indexOf('%'))
76
         customerSignatory.dividendsPer = customerSignatory.dividendsName.substring(customerSignatory.dividendsName.indexOf('|') + 1, customerSignatory.dividendsName.indexOf('%'))
77
         customerSignatory.dividendsName = customerSignatory.dividendsName.substring(0, customerSignatory.dividendsName.indexOf('|'))
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
         HouseTypeList.map((item) => {
79
         HouseTypeList.map((item) => {
80
           if(item.apartmentId === res.customerSignatory[0].houseType) {
80
           if(item.apartmentId === res.customerSignatory[0].houseType) {
81
             setCurrentRoomTypeId(item.apartmentId)
81
             setCurrentRoomTypeId(item.apartmentId)
83
         })
83
         })
84
         setSuccessDate(res.customerSignatory[0].successDate.substring(0, 10))
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
       ConsultantList.map((item) => {
88
       ConsultantList.map((item) => {
87
-        if(item.id === res.customerPreparatory.realtyConsultant) {
89
+        if(item.id === ConsultantId) {
88
           setCurrnetConsultant(item)
90
           setCurrnetConsultant(item)
89
         }
91
         }
90
       })
92
       })