ljc 1 місяць тому
батько
коміт
8ef7c4d55c

+ 2 - 2
composables/useMenuSplit.ts

@@ -108,12 +108,12 @@ export function useMenuSplit(handleClick1: (item: MenuItem) => void) {
                 }
                 return
             } else {
-                handleClick1(item)
+                handleClick1?.(item)
                 router.push(item.path)
                 return
             }
             // #endif
-            handleClick1(item)
+            handleClick1?.(item)
             router.push(item.path)
             return
         }

+ 5 - 3
pages/ib/components/applyIbDialog.vue

@@ -7,7 +7,7 @@
                       :placeholder="t('placeholder.choose')" filterable @change="changeCustomer" style="max-width: 280px" />
         </uni-forms-item>
         <uni-loading v-if="laoding"/>
-        <view v-else class="commission-table-container">
+        <view v-else class="commission-table-container" v-if="addAgentForm.customerId">
           <table class="commission-table">
             <thead>
               <tr>
@@ -72,6 +72,7 @@
             </tbody>
           </table>
         </view>
+        <view v-else style="height: 50px"/>
       </uni-forms>
     </view>
   </cwg-popup>
@@ -137,8 +138,9 @@
   watch(() => props.visible, async (val) => {
     if (val) {
       laoding.value = true
-      await loadCustomerList()
-
+      if (props.isFormApplyIb){
+        await loadCustomerList()
+      }
       if (props.detail.id) {
         let params = {
           customId: props.detail.id,

+ 12 - 8
pages/ib/components/pointDialog.vue

@@ -198,18 +198,16 @@
   }
 
   watch(() => props.detail, (val) => {
-    if (val) {
+    if (val.cId) {
       const { cId, id, comPoint1, hide1 } = val
       dialogForm.value = {
         cId, id, comPoint1, hide1,
       }
-
-      loadCommissionAccountTypes(val.ibId).then(
-        () => {
-          return setCommissionDefaultsFromLoginPoint(val.id)
-        },
-      )
-
+        loadCommissionAccountTypes(val.ibId).then(
+          () => {
+            return setCommissionDefaultsFromLoginPoint(val.id)
+          },
+        )
     }
   })
 
@@ -239,6 +237,11 @@
     dialogForm.value = {
       cId: '',
     }
+    commissionAccountTypeSettings.value = {
+      ecn: { selectedIndex: null, selectedItem: null, loginType: '2' },
+      standard: { selectedIndex: null, selectedItem: null, loginType: '7' },
+      cent: { selectedIndex: null, selectedItem: null, loginType: '8' },
+    }
     emit('close')
   }
 
@@ -280,6 +283,7 @@
     display: flex;
     align-items: center;
     margin-bottom: 20rpx;
+    font-size: px2rpx(20);
   }
 
   .account-adjust-cid-label {

+ 1 - 0
pages/ib/customer.vue

@@ -328,6 +328,7 @@
     applyVisible.value = false
   }
   const closePoint = () => {
+    pointForm.value = {}
     pointVisible.value = false
   }
 

+ 2 - 3
pages/ib/report.vue

@@ -19,6 +19,7 @@
         :show-operation="false"
         :showPagination="true"
         :showSummary="true"
+        :immediate="false"
         :summaryMethod="getSummaries"
       >
       </cwg-tabel>
@@ -345,7 +346,7 @@
   // 接口 根据types 切换(动态代理不同类型报表API)
   const listApi = computed(() => {
     return async (params: any) => {
-      let apiFn: any
+      let apiFn = ibApi.tradeDw
       const type = search.value.reportType
       const detailType = search.value.detail_type
 
@@ -361,7 +362,6 @@
       else if (type == 6) apiFn = ibApi.ibReportBalance
       else if (type == 7) apiFn = ibApi.tradeSymbolCategory
       else if (type == 24) apiFn = ibApi.tradeSalesHidden
-
       if (apiFn) {
         if (type == 2) {
           const isVietnam = country.value === 'VN' // 这里需要你实际的取国家逻辑
@@ -369,7 +369,6 @@
         }
         return await apiFn(params)
       }
-      return Promise.reject('No API found')
     }
   })
 

+ 1 - 0
pages/ib/subsList.vue

@@ -251,6 +251,7 @@
     applyVisible.value = true
   }
   const closeApplyIb = () => {
+    applyDetail.value = {}
     applyVisible.value = false
   }
   const confirmApply = (data) => {