Lijy 4 ヶ月 前
コミット
72903c2d44

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/main.ts

@@ -35,7 +35,7 @@ app.config.globalProperties.$echarts = echarts;
 app
   .use(ElementPlus, {
     locale: zhCn,
-    zIndex: 1600,
+    zIndex: 1200,
   })
   .use(createPinia())
   .use(router)

+ 1 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/analysis/index.vue

@@ -331,6 +331,7 @@ watchEffect(() => {
               title="转成交客户"
               unit="个"
               :number="requestData.summary?.customDataSummary.closeDealNum"
+              v-if="false"
             />
           </div>
           <Divider title="商机汇总" />

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -519,7 +519,7 @@ function getBusinessTableList() {
     businessTable.value = data.map((item: any) => {
       return {
         ...item,
-        expectedTransactionDate: formatDate(new Date(item.expectedTransactionDate))
+        expectedTransactionDate: item.expectedTransactionDate ? formatDate(new Date(item.expectedTransactionDate)) : ''
       }
     })
     businessTotalTable.value = total

+ 23 - 19
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/corpreport/index.vue

@@ -100,10 +100,24 @@ const queryOverall = async (payload?: RequestProps) => {
     { type: 'bar', barWidth: 20 },
     { type: 'bar', barWidth: 20, color: '#b91c1c' }
   ];
+
+  if(userInfo && userInfo.value.userNameNeedTranslate == 1) {
+    dealWithTranslation(sourceDataTypes, sourceData).then((res: any) => {
+      // @ts-ignore
+      chartOptions.dataset.dimensions = ['name', '成交客户数', '新增客户数'];
+      // @ts-ignore
+      chartOptions.dataset.source = res
+      chartOptions.legend = {};
+    })
+
+    return
+  }
+
   // @ts-ignore
   chartOptions.dataset.dimensions = ['name', '成交客户数', '新增客户数'];
   // @ts-ignore
-  chartOptions.dataset.source = userInfo.userNameNeedTranslate == 1 ? dealWithTranslation(sourceDataTypes, sourceData) : sourceData
+  // chartOptions.dataset.source = userInfo.userNameNeedTranslate == 1 ? dealWithTranslation(sourceDataTypes, sourceData) : sourceData
+  chartOptions.dataset.source = sourceData
   // chartOptions.dataset.source = data.map((d) => ({
   //   name: form.type === 1 ? d.name : d.departmentName,
   //   ['成交客户数']: d.customerDeal,
@@ -168,12 +182,7 @@ watchEffect(async () => {
       <el-form :model="form" class="flex gap-4">
         <el-form-item>
           <el-select clearable v-model="form.date" style="width: 112px">
-            <el-option
-              v-for="date in dateOptions"
-              :key="date.value"
-              :label="date.label"
-              :value="date.value"
-            />
+            <el-option v-for="date in dateOptions" :key="date.value" :label="date.label" :value="date.value" />
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -213,18 +222,13 @@ watchEffect(async () => {
         </el-form-item>
       </el-form>
 
-      <el-tabs
-        type="card"
-        v-model="dataType"
-        @tab-change="
-          () => {
-            form.date = undefined;
-            form.member = '';
-            form.type = 1;
-            dataSource = [];
-          }
-        "
-      >
+      <el-tabs type="card" v-model="dataType" @tab-change="() => {
+        form.date = undefined;
+        form.member = '';
+        form.type = 1;
+        dataSource = [];
+      }
+        ">
         <el-tab-pane label="客户总量分析" :name="0" />
         <el-tab-pane label="客户转化率分析" :name="1" />
       </el-tabs>

+ 4 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue

@@ -9,7 +9,7 @@
             </el-form-item>
             <el-form-item label="客户来源">
               <el-select v-model="customerCriteriaForm.customSourceId" placeholder="请选择" clearable>
-                <el-option v-for="item in fixedData.ClueSources" :key="item.id" :label="item.name" :value="item.id" />
+                <el-option v-for="item in fixedData.CustomSources" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
             <el-form-item label="公司号码">
@@ -272,7 +272,7 @@ const allText = reactive({
   exportText: '客户表导出.xlsx'
 })
 const fixedData = reactive({
-  ClueSources: [] as fixedDataInterface[],
+  CustomSources: [] as fixedDataInterface[],
   CustomIndustry: [] as fixedDataInterface[],
   CustomLevel: [] as fixedDataInterface[],
   Personnel: [] as personnelInterface[]
@@ -483,7 +483,8 @@ function getCustomerTable() {
 }
 
 async function getSystemField() {
-  const systemField = getAllListByCode(['线索来源', '客户行业', '客户级别'])
+  const systemField = getAllListByCode(['客户来源', '客户行业', '客户级别'])
+  console.log(systemField, '<==== 123')
   for (let i in systemField) {
     const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
     for (let key of Object.keys(fixedData)) {

+ 7 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/login.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="loginView w-screen h-screen overflow-hidden flex">
-    <div class="w-96 bg-white m-auto border-t-8 border-[#075985] shadow-xl rounded-md pl-9 pr-9">
+    <div class="w-96 bg-white m-auto border-t-8 border-[#075985] shadow-xl rounded-md pl-9 pr-9" v-if="!isCorpWX">
       <div class="m-auto pt-4">
         <img class="w-1/5 m-auto" :src="loginLogo" alt="">
       </div>
@@ -44,6 +44,10 @@
         </div>
       </el-dialog>
     </div>
+
+    <div v-else class="w-full flex justify-center py-[50px] text-[40px] colo-[#505458]">
+      正在进入系统中...
+    </div>
   </div>
 </template>
 
@@ -64,6 +68,8 @@ const ruleFormRef = ref<FormInstance>();
 const ruleForm = ref({
   username: "18122222222",
   password: "000000",
+  // username: "",
+  // password: "",
 });
 const loginLoading = ref(false);
 const rules = reactive<FormRules<typeof ruleForm>>({

+ 2 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -196,7 +196,8 @@ const allVisible = reactive({
 })
 const allText = reactive({
   orderEditText: '新建订单',
-  importText: '销售订单表导出.xlsx'
+  // importText: '销售订单表导出.xlsx'
+  importText: '销售订单表导入.xlsx'
 })
 const orderTemplate = ref({
   list: [],

+ 3 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/team/index.vue

@@ -44,7 +44,7 @@
           </el-button>
           <template #dropdown>
             <el-dropdown-menu>
-              <el-dropdown-item @click="addPersone(false)" v-permission="['teamAdd']">添加人员</el-dropdown-item>
+              <el-dropdown-item @click="addPersone(false)" v-permission="['teamAdd']" v-if="userInfo.userNameNeedTranslate != 1">添加人员</el-dropdown-item>
               <el-dropdown-item @click="transitionOperation('exportUser', '')" v-permission="['teamExport']">导出人员</el-dropdown-item>
               <el-dropdown-item @click="transitionOperation('importUser', '')" v-permission="['teamImport']">批量导入</el-dropdown-item>
             </el-dropdown-menu>
@@ -262,6 +262,7 @@ import { useStore } from '@/store/index'
 import { GET_DATA_LIST, DETELE_DEPT, MOD, GET_USERINFO, GET_ROUTELIST, DEACTIVEUSER, SETACTIVE, GET_DEPTLIST, BACTHSERROLE, GET_USERLIST, GET_ADDDEPT, ADD_USER, SETRESETPWD, EXPOERTUSER, EDIT_ADDDEPT } from './api'
 import { post, uploadFile } from "@/utils/request";
 import { getFromValue, updateDepTreeData, resetFromValue, confirmAction, downloadFile } from '@/utils/tools'
+import { storeToRefs } from 'pinia';
 
 import personnelSearch from '@/components/translationComponent/personnelSearch/personnelSearch.vue';
 
@@ -272,6 +273,7 @@ import { formatDate } from '@/utils/times';
 import { URL_IMPORTTHREAD } from '../thread/constant';
 
 const { getFunctionList, getUserInfoVal } = useStore()
+const { userInfo } = storeToRefs(useStore());
 const globalPopup = inject<GlobalPopup>('globalPopup')
 
 // 定义类型

+ 2 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/detail/components/information.vue

@@ -4,7 +4,7 @@
             <div class="title">基本信息</div>
             <div>
                 <el-button type="primary" v-permission="['threadEdit', userInfo.id == information.inchargerId]"
-                    @click="showVisible('newBusinessisible')">转为商机</el-button>
+                    @click="showVisible('newBusinessisible')" v-if="!information.isBo">转为商机</el-button>
                 <el-button type="primary" @click="claimClues()" v-if="!information.inchargerName">认领</el-button>
                 <el-button type="primary" @click="showVisible('clueDialogVisible')" v-else>转移</el-button>
                 <el-button type="primary" @click="editClue(information)" v-permission="['tasksAdd']">编辑</el-button>
@@ -125,7 +125,7 @@
                 <div class="flex justify-between items-center border-b pb-3 dialog-header">
                     <h4 :id="titleId">{{ allText.businessisText }}</h4>
                     <div>
-                        <el-button type="primary" @click="transferBusiness()"
+                        <el-button type="primary" @click="transferBusiness()" 
                             :loading="allLoading.businessSaveLading">转为商机</el-button>
                         <el-button @click="closeVisible('newBusinessisible')">取消</el-button>
                     </div>

+ 2 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/translationProcessing.ts

@@ -1,4 +1,4 @@
-declare var WWOpenData: any; // wx 小程序对象
+declare var WWOpenData: any;
 /**
  * echarts 转译处理
  * @param items 需要转译的数据源
@@ -27,5 +27,5 @@ export function dealWithTranslation(items: { type: 'userName' | 'departmentName'
     return allData
   };
 
-  myFunOne();
+  return myFunOne();
 }