Explorar o código

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min hai 11 meses
pai
achega
73e790fa8b

+ 6 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/App.vue

@@ -17,6 +17,7 @@ const beforeunloadFn = (() => {
   setAsyncRoutesMark(false)
 })
 
+// 消息提示弹窗
 provide<GlobalPopup>('globalPopup', {
   showSuccess: (message?: string) => {
     notificationTiop({
@@ -99,4 +100,9 @@ body,
     padding: 0 !important;
   }
 }
+
+// 重置样式
+.el-loading-mask {
+  z-index: 1900 !important;
+}
 </style>

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

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

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

@@ -8,7 +8,7 @@
               <el-input v-model="customerCriteriaForm.customName" clearable placeholder="请输入"></el-input>
             </el-form-item>
             <el-form-item label="客户来源">
-              <el-select v-model="customerCriteriaForm.customSourceId" placeholder="请选择">
+              <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-select>
             </el-form-item>
@@ -19,17 +19,17 @@
               <el-input v-model="customerCriteriaForm.email" clearable placeholder="请输入"></el-input>
             </el-form-item>
             <el-form-item label="客户行业">
-              <el-select v-model="customerCriteriaForm.customerIndustryId" placeholder="请选择">
+              <el-select v-model="customerCriteriaForm.customerIndustryId" placeholder="请选择" clearable>
                 <el-option v-for="item in fixedData.CustomIndustry" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
             <el-form-item label="客户级别">
-              <el-select v-model="customerCriteriaForm.customerLevelId" placeholder="请选择">
+              <el-select v-model="customerCriteriaForm.customerLevelId" placeholder="请选择" clearable>
                 <el-option v-for="item in fixedData.CustomLevel" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
             <el-form-item label="负责人">
-              <el-select v-model="customerCriteriaForm.inchargerId" placeholder="请选择">
+              <el-select v-model="customerCriteriaForm.inchargerId" placeholder="请选择" clearable>
                 <el-option v-for="item in fixedData.Personnel" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>

+ 1 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/constant.ts

@@ -6,6 +6,7 @@ export const GETPERSONNEL = '/user/getSimpleActiveUserList'
 export const GETTEMPLATE = `/sys-form/getListByCode${MOD}`
 export const GETTEMPLATETWO = `/sys-form/getListByCode/business`
 export const GETTABLE = `${prefix}/listClue`
+export const GETTALLCLUE = `${prefix}/getAll`
 export const GETDETAIL = `${prefix}/getDetail`
 export const UNDATECLAIM = `${prefix}/claim`
 export const UNDATEFORM = `${prefix}/insertAndUpdate`

+ 62 - 19
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/detail/index.vue

@@ -1,51 +1,86 @@
 <template>
-  <div class="h-full threadDetail">
-    <div class="layout p-3">
-      <div class="bg-white w-1/2 shadow-md rounded-md">
-        <Information :data="information" @refreshData="refreshData"></Information>
+  <div class="h-full flex p-3 flex-col thredDetail">
+    <div class="w-full bg-white p-2 mb-2 shadow-md rounded-md flex items-center">
+      <div class="icon mr-4">
+        <el-link :underline="false" @click="backPath()">
+          <el-icon class="el-icon--right"><icon-view /></el-icon> 返回线索列表
+        </el-link>
       </div>
-      <div class="bg-white w-1/2 ml-3 shadow-md rounded-md">
-        <Attachment :data="attachment" :information="information" @refreshData="refreshData"></Attachment>
+      <div class="mr-8">
+        <el-select v-model="values" placeholder="请选择" style="width: 250px" @change="getDetail()">
+          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
+        </el-select>
       </div>
     </div>
-    <div class="layout pl-3 pr-3 pb-3">
-      <div class="bg-white w-2/3 shadow-md rounded-md">
-        <DetailCompinents :data="relatedTasks" :information="information" :formTaskType="3" :disabledList="['taskType', 'clueId']" :filed="'clueId'" @refreshData="refreshData"></DetailCompinents>
-      </div>
-      <div class="bg-white w-1/3 ml-3 shadow-md rounded-md">
-        <OperationRecord :data="operationRecord" :information="information" @refreshData="refreshData"></OperationRecord>
+    <div class="flex-1 flex flex-col overflow-y-auto overflow-x-hidden scroll-bar" v-loading="loadings">
+      <div class="h-full threadDetail">
+        <div class="layout">
+          <div class="bg-white w-1/2 shadow-md rounded-md">
+            <Information :data="information" @refreshData="refreshData"></Information>
+          </div>
+          <div class="bg-white w-1/2 ml-3 shadow-md rounded-md">
+            <Attachment :data="attachment" :information="information" @refreshData="refreshData"></Attachment>
+          </div>
+        </div>
+        <div class="layout pt-3">
+          <div class="bg-white w-2/3 shadow-md rounded-md">
+            <DetailCompinents :data="relatedTasks" :information="information" :formTaskType="3"
+              :disabledList="['taskType', 'clueId']" :filed="'clueId'" @refreshData="refreshData"></DetailCompinents>
+          </div>
+          <div class="bg-white w-1/3 ml-3 shadow-md rounded-md">
+            <OperationRecord :data="operationRecord" :information="information" @refreshData="refreshData">
+            </OperationRecord>
+          </div>
+        </div>
       </div>
     </div>
   </div>
+
 </template>
-  
+
 <script lang="ts" setup>
 import Information from './components/information.vue'
 import Attachment from './components/attachment.vue'
 import DetailCompinents from '@/components/detailcompinents/relatedTasks.vue'
 import OperationRecord from './components/operationRecord.vue';
 import { ref, reactive, onMounted, inject } from "vue";
+import { Edit, ArrowLeft as IconView } from '@element-plus/icons-vue'
 import { post, get } from "@/utils/request";
 import { useRouter, useRoute } from "vue-router";
-import { GETDETAIL } from "../constant"
+import { GETDETAIL, GETTALLCLUE } from "../constant"
+import { backPath } from '@/utils/tools'
 
 const route = useRoute()
 
 const globalPopup = inject<GlobalPopup>('globalPopup')
-const addressParameters: any = ref(0) // 地址上的参数
+const values = ref<any>('')
+const options = ref<optionType[]>([])
 const information = ref({}) // 基本信息
 const attachment = ref([]) // 附件
 const relatedTasks = ref([]) // 相关任务
 const operationRecord = ref([]) // 操作记录
+const loadings = ref(false)
 
 function getDetail() {
-  const id = addressParameters.value
+  const id = values.value
+  loadings.value = true
   post(GETDETAIL, { id }).then((res) => {
     const { clueLogList, files, taskList } = res.data
     information.value = res.data
     attachment.value = files || []
     relatedTasks.value = taskList || []
     operationRecord.value = clueLogList || []
+  }).finally(() => {
+    loadings.value = false
+  })
+}
+
+function getAllClue() {
+  post(GETTALLCLUE, { }).then(({ data }) => {
+    options.value = (data ?? []).map((item: { clueName: string; id: number }) => ({
+      label: item.clueName,
+      value: item.id
+    }));
   })
 }
 
@@ -55,13 +90,21 @@ function refreshData() {
 
 onMounted(() => {
   const { id } = route.query
-  addressParameters.value = id
+  values.value = id ? +id : ''
   getDetail()
-
+  getAllClue()
 })
 </script>
-  
+
 <style lang="scss" scoped>
+.thredDetail {
+  .icon {
+    .el-link {
+      color: #0052CC;
+    }
+  }
+}
+
 .threadDetail {
   display: flex;
   flex-direction: column;

+ 25 - 10
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/index.vue

@@ -53,21 +53,19 @@
       <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
         <div class="flex justify-end pb-3">
           <el-button type="primary" @click="editClue(false)">新建线索</el-button>
-          <el-button type="primary" @click="batchTransfer()">批量转移</el-button>
-          <el-button type="primary" @click="batchDeletes()">批量删除</el-button>
+          <el-button type="primary" :disabled="batchTableData.length <= 0" @click="batchTransfer()">批量转移</el-button>
+          <el-button type="primary" :disabled="batchTableData.length <= 0" @click="batchDeletes()">批量删除</el-button>
           <el-button type="primary" @click="showDeteleClue(true)">回收站</el-button>
           <el-button type="primary" @click="dialogVisible.importVisible = true">导入</el-button>
           <el-button type="primary" @click="exportTheadTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
         </div>
         <div class="flex-1 w-full overflow-hidden">
-          <el-table ref="clueTableRef" :data="clueTable" border v-loading="allLoading.clueTableLading"
-            style="width: 100%;height: 100%;">
+          <el-table :show-overflow-tooltip="tableShowOverflowTooltip" ref="clueTableRef" :data="clueTable" border v-loading="allLoading.clueTableLading"
+            style="width: 100%;height: 100%;" @selection-change="changeBatch">
             <el-table-column type="selection" width="55" />
             <el-table-column prop="clueName" label="线索名称" width="180">
               <template #default="scope">
-                <el-button link type="primary" size="large" @click.prevent="toClueTableDetail(scope.row)">{{
-                  scope.row.clueName
-                }}</el-button>
+                <div class="table-text-textnowrap" @click.prevent="toClueTableDetail(scope.row)">{{ scope.row.clueName }}</div>
               </template>
             </el-table-column>
             <el-table-column prop="clueSourceValue" label="线索来源" width="180"></el-table-column>
@@ -103,8 +101,8 @@
         <div class="flex justify-between items-center border-b pb-3 dialog-header">
           <h4 :id="titleId">{{ allText.editClueText }}</h4>
           <div>
-            <el-button type="primary" @click="saveEditClue(true)">保存并新建</el-button>
-            <el-button type="primary" @click="saveEditClue(false)">保存</el-button>
+            <el-button type="primary" :loading="allLoading.clueSaveLoading" @click="saveEditClue(true)">保存并新建</el-button>
+            <el-button type="primary" :loading="allLoading.clueSaveLoading" @click="saveEditClue(false)">保存</el-button>
             <el-button @click="dialogVisible.editClueDialogVisible = false">取消</el-button>
           </div>
         </div>
@@ -178,6 +176,7 @@ import { GenerateForm } from '@zmjs/form-design';
 import TaskModal from '@/components/TaskModal/index.vue'
 import DeteleTables from "./deteleTables.vue";
 import { createTask } from "@/components/TaskModal/taskFunction";
+import { tableShowOverflowTooltip } from '@/utils/globalVariables'
 
 // 定义类型
 interface fixedDataInterface {
@@ -220,6 +219,7 @@ const allLoading = reactive({
   clueLoading: false,
   importLoading: false,
   exoprtLoading: false,
+  clueSaveLoading: false
 })
 const dialogVisible = reactive({
   editClueDialogVisible: false,
@@ -248,6 +248,7 @@ const clueTemplate = ref({
 }) // 线索模板
 const editForm = ref({}) // 编辑表单
 const taskModalForm = ref({}) // 任务弹窗表单
+const batchTableData = ref([])
 
 // 批量变量
 const transferForm = reactive({
@@ -289,6 +290,7 @@ function transferClues() {
     if (res.code == 'ok') {
       globalPopup?.showSuccess('批量转移成功')
       dialogVisible.clueDialogVisible = false
+      changeBatch(false)
       getClueTable()
     }
   })
@@ -344,13 +346,14 @@ async function saveEditClue(flag: boolean) {
   const data = await generateForm.value.getData()
   let newData = { ...editForm.value, ...data }
   delete newData.createTime
+  allLoading.clueSaveLoading = true
   post(UNDATEFORM, { ...newData }).then((res) => {
     if (res.code != 'ok') {
       globalPopup?.showError(res.msg)
       return
     }
     globalPopup?.showSuccess('保存成功')
-    if (!flag) {
+    if (flag) {
       editForm.value = {}
       generateForm.value && generateForm.value.reset()
       generateFormKey.value++
@@ -359,6 +362,8 @@ async function saveEditClue(flag: boolean) {
     getClueTable()
   }).catch((_err) => {
     console.log(_err)
+  }).finally(() => {
+    allLoading.clueSaveLoading = false
   })
 }
 
@@ -391,6 +396,15 @@ async function importProducts(param: UploadRequestOptions) {
   globalPopup?.showError(res.msg || '')
 }
 
+function changeBatch(flag: boolean = true) {
+  if (flag) {
+    batchTableData.value = clueTableRef.value && clueTableRef.value.getSelectionRows()
+  } else {
+    batchTableData.value = []
+    clueTableRef.value && clueTableRef.value.clearSelection()
+  }
+}
+
 function batchTransfer() {
   const data = clueTableRef.value && clueTableRef.value.getSelectionRows()
   if (!data.length) {
@@ -417,6 +431,7 @@ function batchDeletes() {
         return
       }
       globalPopup?.showSuccess('删除成功')
+      changeBatch(false)
       getClueTable()
     })
   })

+ 12 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/styles/global.scss

@@ -23,7 +23,7 @@ $modena: #6f4afe;
 }
 
 .scroll-bar::-webkit-scrollbar-thumb {
-  background: linear-gradient(to bottom right, #C1C1C1 0%, #C1C1C1 100%);
+  background: linear-gradient(to bottom right, #c1c1c1 0%, #c1c1c1 100%);
   border-radius: 5px;
 }
 
@@ -33,7 +33,7 @@ $modena: #6f4afe;
 }
 
 .scroll-bar::-webkit-scrollbar-button {
-  background-color: #C1C1C1;
+  background-color: #c1c1c1;
   border-radius: 2px;
   height: 4px;
 }
@@ -47,7 +47,16 @@ $modena: #6f4afe;
   height: 0px;
 }
 
-.el-dialog__header, .el-dialog__body{
+.el-dialog__header,
+.el-dialog__body {
   margin: 0 !important;
   padding: 0 !important;
 }
+
+.table-text-textnowrap {
+  white-space: nowrap;  
+  overflow: hidden;
+  text-overflow: ellipsis;
+  color: #075985;
+  cursor: pointer;
+}

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

@@ -0,0 +1,2 @@
+// 表格一行显示,超出 提示 Tooltip
+export const tableShowOverflowTooltip: any = { enterable: true, placement: 'top', showArrow: true, hideAfter: 200, popperOptions: { strategy: 'fixed' } }