lisenzhou 2 anni fa
parent
commit
6d2eb9816d
1 ha cambiato i file con 58 aggiunte e 26 eliminazioni
  1. 58
    26
      src/subpackages/pages/marketing/changeVisit/index.jsx

+ 58
- 26
src/subpackages/pages/marketing/changeVisit/index.jsx Vedi File

36
     houseType: "",
36
     houseType: "",
37
     price: "",
37
     price: "",
38
     successDate: "",
38
     successDate: "",
39
+    totalCommission: "", //佣金总额
40
+    currentCommission: 0, //本次结佣
39
   });
41
   });
40
 
42
 
41
   const [FormData, setFormData] = useState({ ...RenChouData });
43
   const [FormData, setFormData] = useState({ ...RenChouData });
103
           setFormData({
105
           setFormData({
104
             ...FormData,
106
             ...FormData,
105
             ...res?.customerPreparatory,
107
             ...res?.customerPreparatory,
108
+            totalCommission:res.channelCustomer.totalCommission /100, //佣金总额
106
             realtyConsultant: res?.realtyConsultant,
109
             realtyConsultant: res?.realtyConsultant,
107
           });
110
           });
108
         }
111
         }
128
           setQianYueData({
131
           setQianYueData({
129
             ...QianYueData,
132
             ...QianYueData,
130
             ...customerSignatory,
133
             ...customerSignatory,
134
+            totalCommission:res.channelCustomer.totalCommission, //佣金总额
135
+            
131
             realtyConsultant: res?.realtyConsultant,
136
             realtyConsultant: res?.realtyConsultant,
132
           });
137
           });
133
           // setQianYueData({ ...QianYueData, ...customerSignatory, realtyConsultant:   (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null })
138
           // setQianYueData({ ...QianYueData, ...customerSignatory, realtyConsultant:   (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null })
262
         }
267
         }
263
       }
268
       }
264
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`;
269
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`;
270
+
271
+      console.log({
272
+        customerId: id,
273
+        customerSignatory: {
274
+          ...params,
275
+          channelId:
276
+            channelId === "null" || channelId === null ? "" : channelId,
277
+          channelCustomerId,
278
+        },
279
+        totalCommission:Number(params.totalCommission) * 100,
280
+        currentCommission:Number(params.currentCommission) * 100
281
+      },']]]]');
265
       fetch({
282
       fetch({
266
         url: API_SURE_SIGN,
283
         url: API_SURE_SIGN,
267
         method: "put",
284
         method: "put",
273
               channelId === "null" || channelId === null ? "" : channelId,
290
               channelId === "null" || channelId === null ? "" : channelId,
274
             channelCustomerId,
291
             channelCustomerId,
275
           },
292
           },
293
+          totalCommission:Number(params.totalCommission) * 100,
294
+          currentCommission:Number(params.currentCommission) * 100
276
         },
295
         },
277
       }).then(() => {
296
       }).then(() => {
278
         Taro.showToast({ title: "修改成功", icon: "none", duration: 2000 });
297
         Taro.showToast({ title: "修改成功", icon: "none", duration: 2000 });
355
             </view>
374
             </view>
356
           </view>
375
           </view>
357
 
376
 
358
-          {/* {channelCustomer.recommendPersonType === ROLE_CODE.BROKER ? (
359
-            <>
360
-              <text>报备经纪人</text>
361
-              <view className="FormLine flex-h">
362
-                <view className="flex-item">
363
-                  <text>{channelCustomer.recommendPersonName}</text>
364
-               
365
-                </view>
366
-              </view>
367
-            </>
368
-          ) : (
369
-            <>
370
-              <text>归属渠道</text>
371
-              <view className="FormLine flex-h">
372
-                <view className="flex-item">
373
-                  <text>{channelCustomer.channelName}</text>
374
-                
375
-                </view>
376
-              </view>
377
-            </>
378
-          )} */}
379
-
380
           {channelCustomerInfo?.channelCustomer?.recommendPersonType ===
377
           {channelCustomerInfo?.channelCustomer?.recommendPersonType ===
381
           ROLE_CODE.BROKER ? (
378
           ROLE_CODE.BROKER ? (
382
             <>
379
             <>
529
             </Block>
526
             </Block>
530
           )}
527
           )}
531
 
528
 
532
-{/* {(CurrentStatusId === 4 ||
529
+          {(CurrentStatusId === 4 ||
533
             CurrentStatusId === 5 ||
530
             CurrentStatusId === 5 ||
534
             CurrentStatusId === 6) && (
531
             CurrentStatusId === 6) && (
535
             <Block>
532
             <Block>
537
               <view className="FormLine flex-h">
534
               <view className="FormLine flex-h">
538
                 <view className="flex-item">
535
                 <view className="flex-item">
539
                   <Input
536
                   <Input
537
+                  type='number'
540
                     placeholder="请输入金额"
538
                     placeholder="请输入金额"
541
-                    value={FormData.price}
542
-                    onInput={InputChange.bind(this, "price")}
539
+                    value={FormData.totalCommission}
540
+                    onInput={InputChange.bind(this, "totalCommission")}
541
+                  ></Input>
542
+                </view>
543
+              </view>
544
+            </Block>
545
+          )}
546
+
547
+          {(CurrentStatusId === 4 ||
548
+            CurrentStatusId === 5 ||
549
+            CurrentStatusId === 6) && (
550
+            <Block>
551
+              <text>已结佣金</text>
552
+              <view className="FormLine flex-h">
553
+                <view className="flex-item">
554
+                  <text>
555
+                    {(channelCustomerInfo?.channelCustomer?.settledCommission ||
556
+                      0) / 100}
557
+                  </text>
558
+                </view>
559
+              </view>
560
+            </Block>
561
+          )}
562
+
563
+          {(CurrentStatusId === 4 ||
564
+            CurrentStatusId === 5 ||
565
+            CurrentStatusId === 6) && (
566
+            <Block>
567
+              <text style={{ display: "none" }}>本次结佣</text>
568
+              <view className="FormLine flex-h" style={{ display: "none" }}>
569
+                <view className="flex-item">
570
+                  <Input
571
+                   type='number'
572
+                    placeholder="请输入金额"
573
+                    value={FormData.currentCommission}
574
+                    onInput={InputChange.bind(this, "currentCommission")}
543
                   ></Input>
575
                   ></Input>
544
                 </view>
576
                 </view>
545
               </view>
577
               </view>
546
             </Block>
578
             </Block>
547
-          )} */}
579
+          )}
548
 
580
 
549
           <text>备注</text>
581
           <text>备注</text>
550
           <view className="FormLine flex-h">
582
           <view className="FormLine flex-h">