lisenzhou 2 years ago
parent
commit
eb50f32045
1 changed files with 39 additions and 31 deletions
  1. 39
    31
      src/subpackages/pages/marketing/changeVisit/index.jsx

+ 39
- 31
src/subpackages/pages/marketing/changeVisit/index.jsx View File

106
           setFormData({
106
           setFormData({
107
             ...FormData,
107
             ...FormData,
108
             ...res?.customerPreparatory,
108
             ...res?.customerPreparatory,
109
-            totalCommission:res.channelCustomer.totalCommission /100, //佣金总额
109
+            totalCommission: res.channelCustomer.totalCommission / 100, //佣金总额
110
             realtyConsultant: res?.realtyConsultant,
110
             realtyConsultant: res?.realtyConsultant,
111
           });
111
           });
112
         }
112
         }
132
           setQianYueData({
132
           setQianYueData({
133
             ...QianYueData,
133
             ...QianYueData,
134
             ...customerSignatory,
134
             ...customerSignatory,
135
-            totalCommission:res.channelCustomer.totalCommission, //佣金总额
136
-            
135
+            totalCommission: res.channelCustomer.totalCommission, //佣金总额
136
+
137
             realtyConsultant: res?.realtyConsultant,
137
             realtyConsultant: res?.realtyConsultant,
138
           });
138
           });
139
           // setQianYueData({ ...QianYueData, ...customerSignatory, realtyConsultant:   (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null })
139
           // setQianYueData({ ...QianYueData, ...customerSignatory, realtyConsultant:   (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null })
269
       }
269
       }
270
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`;
270
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`;
271
 
271
 
272
-      console.log({
273
-        customerId: id,
274
-        customerSignatory: {
275
-          ...params,
276
-          channelId:
277
-            channelId === "null" || channelId === null ? "" : channelId,
278
-          channelCustomerId,
272
+      console.log(
273
+        {
274
+          customerId: id,
275
+          customerSignatory: {
276
+            ...params,
277
+            channelId:
278
+              channelId === "null" || channelId === null ? "" : channelId,
279
+            channelCustomerId,
280
+          },
281
+          totalCommission: Number(params.totalCommission) * 100,
282
+          currentCommission: Number(params.currentCommission) * 100,
279
         },
283
         },
280
-        totalCommission:Number(params.totalCommission) * 100,
281
-        currentCommission:Number(params.currentCommission) * 100
282
-      },']]]]');
284
+        "]]]]"
285
+      );
283
       fetch({
286
       fetch({
284
         url: API_SURE_SIGN,
287
         url: API_SURE_SIGN,
285
         method: "put",
288
         method: "put",
291
               channelId === "null" || channelId === null ? "" : channelId,
294
               channelId === "null" || channelId === null ? "" : channelId,
292
             channelCustomerId,
295
             channelCustomerId,
293
           },
296
           },
294
-          totalCommission:Number(params.totalCommission) * 100,
295
-          currentCommission:Number(params.currentCommission) * 100
297
+          totalCommission: Number(params.totalCommission) * 100,
298
+          currentCommission: Number(params.currentCommission) * 100,
296
         },
299
         },
297
       }).then(() => {
300
       }).then(() => {
298
         Taro.showToast({ title: "修改成功", icon: "none", duration: 2000 });
301
         Taro.showToast({ title: "修改成功", icon: "none", duration: 2000 });
339
       }
342
       }
340
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`;
343
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`;
341
 
344
 
342
-      console.log({
343
-        customerId: id,
344
-        customerSignatory: {
345
-          ...params,
346
-          channelId:
347
-            channelId === "null" || channelId === null ? "" : channelId,
348
-          channelCustomerId,
345
+      console.log(
346
+        {
347
+          customerId: id,
348
+          customerSignatory: {
349
+            ...params,
350
+            channelId:
351
+              channelId === "null" || channelId === null ? "" : channelId,
352
+            channelCustomerId,
353
+          },
354
+          totalCommission: Number(params.totalCommission) * 100,
355
+          currentCommission: Number(params.currentCommission) * 100,
349
         },
356
         },
350
-        totalCommission:Number(params.totalCommission) * 100,
351
-        currentCommission:Number(params.currentCommission) * 100
352
-      },']]]]');
357
+        "]]]]"
358
+      );
353
       fetch({
359
       fetch({
354
         url: API_SURE_ALLPAYMENT,
360
         url: API_SURE_ALLPAYMENT,
355
         method: "put",
361
         method: "put",
361
               channelId === "null" || channelId === null ? "" : channelId,
367
               channelId === "null" || channelId === null ? "" : channelId,
362
             channelCustomerId,
368
             channelCustomerId,
363
           },
369
           },
364
-          totalCommission:Number(params.totalCommission) * 100,
365
-          currentCommission:Number(params.currentCommission) * 100
370
+          totalCommission: Number(params.totalCommission) * 100,
371
+          currentCommission: Number(params.currentCommission) * 100,
366
         },
372
         },
367
       }).then(() => {
373
       }).then(() => {
368
         Taro.showToast({ title: "修改成功", icon: "none", duration: 2000 });
374
         Taro.showToast({ title: "修改成功", icon: "none", duration: 2000 });
579
               <view className="FormLine flex-h">
585
               <view className="FormLine flex-h">
580
                 <view className="flex-item">
586
                 <view className="flex-item">
581
                   <Input
587
                   <Input
582
-                  type='number'
588
+                    type="number"
583
                     placeholder="请输入金额"
589
                     placeholder="请输入金额"
584
                     value={FormData.totalCommission}
590
                     value={FormData.totalCommission}
585
                     onInput={InputChange.bind(this, "totalCommission")}
591
                     onInput={InputChange.bind(this, "totalCommission")}
609
             CurrentStatusId === 5 ||
615
             CurrentStatusId === 5 ||
610
             CurrentStatusId === 6) && (
616
             CurrentStatusId === 6) && (
611
             <Block>
617
             <Block>
612
-              <text style={{ display: "none" }}>本次结佣</text>
613
-              <view className="FormLine flex-h" style={{ display: "none" }}>
618
+              <text style={{ display: person.brokerManager ? "block" : "none" }}>
619
+                本次结佣
620
+              </text>
621
+              <view className="FormLine flex-h" style={{  display: person.brokerManager ? "block" : "none" }}>
614
                 <view className="flex-item">
622
                 <view className="flex-item">
615
                   <Input
623
                   <Input
616
-                   type='number'
624
+                    type="number"
617
                     placeholder="请输入金额"
625
                     placeholder="请输入金额"
618
                     value={FormData.currentCommission}
626
                     value={FormData.currentCommission}
619
                     onInput={InputChange.bind(this, "currentCommission")}
627
                     onInput={InputChange.bind(this, "currentCommission")}