Pārlūkot izejas kodu

feat:客户管理,代理管理,信号源管理,修改邮箱

ljc 1 mēnesi atpakaļ
vecāks
revīzija
c3cd48a43d

+ 2 - 2
pages/ib/agentList.vue

@@ -5,7 +5,7 @@
     <view class="account-content">
     <view class="account-content">
       <view class="search-content">
       <view class="search-content">
         <view class="search-bar">
         <view class="search-bar">
-          <uni-easyinput v-model="search.cId" placeholder="CID" />
+          <uni-easyinput v-model="search.name" :placeholder="t('Ib.Custom.NameLabel')" />
         </view>
         </view>
         <view class="search-bar">
         <view class="search-bar">
         </view>
         </view>
@@ -192,7 +192,7 @@
   ])
   ])
 
 
 
 
-  const listApi = ref(ibApi.IbSubs)
+  const listApi = ref(ibApi.followDealAgentSearchList)
   const handleDateChange = (val) => {
   const handleDateChange = (val) => {
     search.value.startDate = val[0]
     search.value.startDate = val[0]
     search.value.endDate = val[1]
     search.value.endDate = val[1]

+ 9 - 11
pages/ib/components/applyIbDialog.vue

@@ -147,16 +147,13 @@
   watch(() => props.visible, (val) => {
   watch(() => props.visible, (val) => {
     if (val) {
     if (val) {
       loadCustomerList()
       loadCustomerList()
-
-      // initCommissionTemplateData(29634)
-      console.log(props.detail)
       if (props.detail.id) {
       if (props.detail.id) {
         let params = {
         let params = {
           customerId: props.detail.id,
           customerId: props.detail.id,
         }
         }
         if (props.paramsType == 'vietnam') {
         if (props.paramsType == 'vietnam') {
           params = {
           params = {
-            agentId: props.params.id,
+            agentId: props.detail.id,
           }
           }
         }
         }
         initCommissionTemplateData(params)
         initCommissionTemplateData(params)
@@ -212,7 +209,7 @@
 
 
         res.data.forEach((group: any) => {
         res.data.forEach((group: any) => {
           const accountGroup = group.groupCategoryName || '--'
           const accountGroup = group.groupCategoryName || '--'
-          const valid = group.valid !== undefined ? group.valid : 1
+          const isOpen = group.valid !== undefined ? group.valid : 1
 
 
           if (!groupedData[accountGroup]) {
           if (!groupedData[accountGroup]) {
             groupedData[accountGroup] = []
             groupedData[accountGroup] = []
@@ -226,7 +223,7 @@
               groupCategoryId: group.groupCategoryId,
               groupCategoryId: group.groupCategoryId,
               dataType: 'rebates',
               dataType: 'rebates',
               type: group.rebateTypeName || 'Point',
               type: group.rebateTypeName || 'Point',
-              valid,
+              isOpen,
               forex: 0,
               forex: 0,
               index: 0,
               index: 0,
               metal: 0,
               metal: 0,
@@ -272,7 +269,7 @@
               groupCategoryId: group.groupCategoryId,
               groupCategoryId: group.groupCategoryId,
               dataType: 'commissions',
               dataType: 'commissions',
               type: group.commissionTypeName || 'Commission',
               type: group.commissionTypeName || 'Commission',
-              valid,
+              isOpen,
               forex: 0,
               forex: 0,
               index: 0,
               index: 0,
               metal: 0,
               metal: 0,
@@ -315,10 +312,11 @@
         const finalData = Object.keys(groupedData).map((accountGroup) => {
         const finalData = Object.keys(groupedData).map((accountGroup) => {
           return {
           return {
             accountGroup,
             accountGroup,
-            isOpen: false, // 默认不展开
+            // 默认不展开
+            isOpen:groupedData[accountGroup].some(item => item.isOpen == 1) || false ,
             items: groupedData[accountGroup],
             items: groupedData[accountGroup],
           }
           }
-        })
+        }).filter(item => item.items.length > 0)
 
 
         console.log('tableData', finalData)
         console.log('tableData', finalData)
         commissionTemplateTableData.value = finalData
         commissionTemplateTableData.value = finalData
@@ -345,7 +343,7 @@
       })
       })
       if (res.code == Code.StatusOK) {
       if (res.code == Code.StatusOK) {
         customerList.value = res.data.map(item => ({
         customerList.value = res.data.map(item => ({
-          label: `${item.name || ''}-${item.cId}`,
+          text: `${item.name || ''}-${item.cId}`,
           value: item.id || '',
           value: item.id || '',
           cId: item.cId, // 保存 cId 供后续提交使用
           cId: item.cId, // 保存 cId 供后续提交使用
         })) || []
         })) || []
@@ -588,7 +586,7 @@
   }
   }
 
 
   .field-col {
   .field-col {
-    flex: 0 0 calc(20% - px2rpx(10));
+    flex: 0 0 calc( 20% - px2rpx(10) );
     min-width: px2rpx(80);
     min-width: px2rpx(80);
     max-width: px2rpx(120);
     max-width: px2rpx(120);
     display: flex;
     display: flex;

+ 0 - 7
pages/ib/recording.vue

@@ -57,13 +57,6 @@
             {{ t('Btn.Cancel') }}
             {{ t('Btn.Cancel') }}
           </button>
           </button>
         </template>
         </template>
-        <template #action="{ row }">
-          <cwg-dropdown :menu-list="menuList(row)" @menuClick="handleMenuClick">
-            <view class="pc-header-btn">
-              <cwg-icon name="crm-ellipsis" :size="24" />
-            </view>
-          </cwg-dropdown>
-        </template>
       </cwg-tabel>
       </cwg-tabel>
     </view>
     </view>
   </cwg-page-wrapper>
   </cwg-page-wrapper>

+ 38 - 25
pages/ib/subsList.vue

@@ -9,11 +9,12 @@
           <view class="search-bar mobile-add-btn-wrap">
           <view class="search-bar mobile-add-btn-wrap">
             <button type="primary" class="search-button" @click="addSub">
             <button type="primary" class="search-button" @click="addSub">
               <cwg-icon name="icon_add" :size="18" color="#fff"></cwg-icon>
               <cwg-icon name="icon_add" :size="18" color="#fff"></cwg-icon>
-              {{t('Ib.Report.Title5')}}
+              {{ t('Ib.Report.Title5') }}
             </button>
             </button>
           </view>
           </view>
           <view class="search-bar">
           <view class="search-bar">
-            <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch" @reset="handleReset" />
+            <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
+                                @reset="handleReset" />
           </view>
           </view>
         </view>
         </view>
       </cwg-match-media>
       </cwg-match-media>
@@ -22,17 +23,18 @@
       <cwg-match-media :min-width="991">
       <cwg-match-media :min-width="991">
         <view class="search-content pc-search-content">
         <view class="search-content pc-search-content">
           <view class="search-bar">
           <view class="search-bar">
-            <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch" @reset="handleReset" />
+            <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
+                                @reset="handleReset" />
           </view>
           </view>
           <view class="search-bar">
           <view class="search-bar">
             <button type="primary" class="search-button" @click="addSub">
             <button type="primary" class="search-button" @click="addSub">
               <cwg-icon name="icon_add" :size="18" color="#fff"></cwg-icon>
               <cwg-icon name="icon_add" :size="18" color="#fff"></cwg-icon>
-              {{t('Ib.Report.Title5')}}
+              {{ t('Ib.Report.Title5') }}
             </button>
             </button>
           </view>
           </view>
         </view>
         </view>
       </cwg-match-media>
       </cwg-match-media>
-      
+
       <cwg-tabel
       <cwg-tabel
         ref="tableRef"
         ref="tableRef"
         :columns="columns"
         :columns="columns"
@@ -43,15 +45,19 @@
         :showPagination="true"
         :showPagination="true"
       >
       >
         <template #action="{ row }">
         <template #action="{ row }">
-          <cwg-dropdown :menu-list="menuList(row)" @menuClick="handleMenuClick">
-            <view class="pc-header-btn">
-              <cwg-icon name="crm-ellipsis" :size="24" />
-            </view>
-          </cwg-dropdown>
+          <view style="display: flex; justify-content: center;">
+            <cwg-dropdown :menu-list="menuList(row)" @menuClick="handleMenuClick">
+              <view class="pc-header-btn">
+                <cwg-icon name="crm-ellipsis" :size="24" color="#000"/>
+              </view>
+            </cwg-dropdown>
+          </view>
         </template>
         </template>
       </cwg-tabel>
       </cwg-tabel>
     </view>
     </view>
-    <ApplyIbDialog ref="applyIbDialogRef" :visible="applyVisible" @close="closeApplyIb" @confirm="confirmApply" :title="formDia?'Ib.Custom.Commit3':'Ib.Report.Title5'" :isFormApplyIb="formDia" :paramsType="applyType" :detail="applyDetail"/>
+    <ApplyIbDialog ref="applyIbDialogRef" :visible="applyVisible" @close="closeApplyIb" @confirm="confirmApply"
+                   :title="formDia?'Ib.Report.Title5':'Ib.Custom.Commit3'" :isFormApplyIb="formDia"
+                   :paramsType="applyType" :detail="applyDetail" />
     <cwg-popup
     <cwg-popup
       :visible="exclusiveVisible"
       :visible="exclusiveVisible"
       :title="t('Ib.Custom.Commit5')"
       :title="t('Ib.Custom.Commit5')"
@@ -100,12 +106,18 @@
     startDate: '',
     startDate: '',
     endDate: '',
     endDate: '',
   })
   })
-  
+
   const filterFields = [
   const filterFields = [
     { key: 'ibNo', type: 'input', label: t('Label.IbAccount'), placeholder: t('Label.IbAccount'), defaultValue: '' },
     { key: 'ibNo', type: 'input', label: t('Label.IbAccount'), placeholder: t('Label.IbAccount'), defaultValue: '' },
-    { key: 'name', type: 'input', label: t('Ib.Custom.NameLabel'), placeholder: t('Ib.Custom.NameLabel'), defaultValue: '' },
+    {
+      key: 'name',
+      type: 'input',
+      label: t('Ib.Custom.NameLabel'),
+      placeholder: t('Ib.Custom.NameLabel'),
+      defaultValue: '',
+    },
     { key: 'cId', type: 'input', label: 'CID', placeholder: 'CID', defaultValue: '' },
     { key: 'cId', type: 'input', label: 'CID', placeholder: 'CID', defaultValue: '' },
-    { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
+    { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' },
   ]
   ]
   const tableRef = ref(null)
   const tableRef = ref(null)
   const applyIbDialogRef = ref(null)
   const applyIbDialogRef = ref(null)
@@ -116,7 +128,7 @@
   const exclusiveVisible = ref(false)
   const exclusiveVisible = ref(false)
   const exclusiveCommissionFormRef = ref(null)
   const exclusiveCommissionFormRef = ref(null)
   const exclusiveCommissionForm = ref({
   const exclusiveCommissionForm = ref({
-    agentId: "",
+    agentId: '',
     selectedPoint: '',
     selectedPoint: '',
     pointOptions: [],
     pointOptions: [],
   })
   })
@@ -224,7 +236,7 @@
     })
     })
   }
   }
 
 
-  onMounted(()=>{
+  onMounted(() => {
     // applyVisible.value = true
     // applyVisible.value = true
   })
   })
   // 下拉菜单配置
   // 下拉菜单配置
@@ -245,20 +257,21 @@
     ].filter((item) => item.show)
     ].filter((item) => item.show)
   }
   }
   const handleMenuClick = (item) => {
   const handleMenuClick = (item) => {
-    if (item.type == 'vietnamDistribution') {
-      const { agentId, id } = item.row
+    const { value } = item
+    if (value.type == 'vietnamDistribution') {
+      const { agentId, id } = value.row
       applyDetail.value = {
       applyDetail.value = {
-        id: id|| agentId
+        id: id || agentId,
       }
       }
-      formDia.value = true
+      formDia.value = false
       applyType.value = 'vietnam'
       applyType.value = 'vietnam'
       applyVisible.value = true
       applyVisible.value = true
-    } else if (item.type == 'exclusiveCommission') {
-      openExclusiveCommission(item.row)
+    } else if (value.type == 'exclusiveCommission') {
+      openExclusiveCommission(value.row)
     }
     }
   }
   }
   const addSub = () => {
   const addSub = () => {
-    formDia.value = false
+    formDia.value = true
     applyVisible.value = true
     applyVisible.value = true
   }
   }
   const closeApplyIb = () => {
   const closeApplyIb = () => {
@@ -321,7 +334,7 @@
   .mobile-search-content {
   .mobile-search-content {
     flex-direction: column;
     flex-direction: column;
     margin-bottom: px2rpx(10);
     margin-bottom: px2rpx(10);
-    
+
     .mobile-add-btn-wrap {
     .mobile-add-btn-wrap {
       display: flex;
       display: flex;
       justify-content: flex-end;
       justify-content: flex-end;
@@ -335,7 +348,7 @@
     }
     }
   }
   }
 
 
-  .search-button{
+  .search-button {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     background-color: var(--color-error);
     background-color: var(--color-error);

+ 1 - 1
pages/mine/components/SecurityCenterTab.vue

@@ -205,7 +205,7 @@ async function passwordUpdate() {
             ...passwordInfo.value
             ...passwordInfo.value
         });
         });
         if (res.code === 200) {
         if (res.code === 200) {
-            start()
+            // start()
             showToast(t("Msg.Success"));
             showToast(t("Msg.Success"));
         } else {
         } else {
             showToast(res.msg);
             showToast(res.msg);

+ 0 - 1
utils/request.js

@@ -47,7 +47,6 @@ const requestInterceptor = (config) => {
   if (method === "GET") {
   if (method === "GET") {
     config.data = { ...(config.data || {}) };
     config.data = { ...(config.data || {}) };
   } else {
   } else {
-    console.log(config.data,'ccc')
     config.data = { ...(config.data || {}) };
     config.data = { ...(config.data || {}) };
   }
   }
   if (!config.header["Content-Type"]) {
   if (!config.header["Content-Type"]) {