瀏覽代碼

fix 内场接待

Baozhangchao 3 年之前
父節點
當前提交
9e0acfa0e9

+ 7
- 2
src/subpackages/pages/marketing/changeVisit/index.jsx 查看文件

61
       }
61
       }
62
       getCardList(params).then((res) => {
62
       getCardList(params).then((res) => {
63
         const { records } = res
63
         const { records } = res
64
+        console.log("🚀 ~ file: index.jsx ~ line 64 ~ getCardList ~ records", records)
64
         setConsultantList(records || [])
65
         setConsultantList(records || [])
65
       })
66
       })
66
     }
67
     }
103
         })
104
         })
104
         setSuccessDate(res.customerSignatory[0].successDate.substring(0, 10))
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
       ConsultantList.map((item) => {
113
       ConsultantList.map((item) => {
109
         if (item.id === ConsultantId) {
114
         if (item.id === ConsultantId) {
110
           setCurrnetConsultant(item)
115
           setCurrnetConsultant(item)

+ 8
- 2
src/subpackages/pages/marketing/sureVisit/index.jsx 查看文件

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