Bläddra i källkod

fix 内场接待

Baozhangchao 3 år sedan
förälder
incheckning
9e0acfa0e9

+ 7
- 2
src/subpackages/pages/marketing/changeVisit/index.jsx Visa fil

@@ -61,6 +61,7 @@ export default withLayout((props) => {
61 61
       }
62 62
       getCardList(params).then((res) => {
63 63
         const { records } = res
64
+        console.log("🚀 ~ file: index.jsx ~ line 64 ~ getCardList ~ records", records)
64 65
         setConsultantList(records || [])
65 66
       })
66 67
     }
@@ -103,8 +104,12 @@ export default withLayout((props) => {
103 104
         })
104 105
         setSuccessDate(res.customerSignatory[0].successDate.substring(0, 10))
105 106
       }
106
-      const ConsultantId = CurrentStatusId === 3 ? res.customerPreparatory?.realtyConsultant : (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null
107
-      console.log(`ConsultantId is`, ConsultantId)
107
+      // const ConsultantId = CurrentStatusId === 3 ? res.customerPreparatory?.realtyConsultant : (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null
108
+      const ConsultantId = CurrentStatusId === 3 ? res?.realtyConsultant : (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null
109
+
110
+      console.log(`ConsultantId is`, ConsultantId, id)
111
+
112
+
108 113
       ConsultantList.map((item) => {
109 114
         if (item.id === ConsultantId) {
110 115
           setCurrnetConsultant(item)

+ 8
- 2
src/subpackages/pages/marketing/sureVisit/index.jsx Visa fil

@@ -48,7 +48,9 @@ export default withLayout((props) => {
48 48
     })
49 49
   }
50 50
 
51
-  const handleSubmit = () => {
51
+  const handleSubmit = (e) => {
52
+    console.log("🚀 ~ file: index.jsx ~ line 84 ~ handleSubmit ~ e", e)
53
+
52 54
     const payload = {
53 55
       id,
54 56
       type: 'report',
@@ -59,15 +61,19 @@ export default withLayout((props) => {
59 61
         recommendPerson: channelCustomer.recommendPerson,
60 62
         realtyConsultant: consultant,
61 63
         imageUrl,
64
+
62 65
         visitDate: `${visitDate}T12:00:00.000Z`,  // 随便造了一个时刻
63 66
         remark,
64 67
         channelId: channelCustomer.channelId,
65 68
         channelCustomerId,
66
-      }
69
+      },
70
+
67 71
     }
72
+    console.log("🚀 ~ file: index.jsx ~ line 55 ~ handleSubmit ~ payload", payload)
68 73
 
69 74
     setLoading(true)
70 75
     fetch({ url: API_MARKETING_VISIT, payload, method: 'PUT' }).then((res) => {
76
+      console.log("🚀 ~ file: index.jsx ~ line 76 ~ fetch ~ res", res)
71 77
       setLoading(false)
72 78
       Taro.showToast({
73 79
         title: '操作成功',