Quellcode durchsuchen

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

zhouyy vor 5 Monaten
Ursprung
Commit
c7b03425ce
28 geänderte Dateien mit 1091 neuen und 73 gelöschten Zeilen
  1. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/assets/scss/iframe.scss
  2. 44 27
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/components/common/pullDownSelector.vue
  3. 14 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js
  4. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/addEditor.vue
  5. 3 8
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/detail.vue
  6. 59 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/relatedBusinessOpportunities.vue
  7. 53 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/contactsInfo.vue
  8. 48 5
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/detail.vue
  9. 54 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/relatedContacts.vue
  10. 60 3
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contract/detail.vue
  11. 56 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/customerInfo.vue
  12. 60 5
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/detail.vue
  13. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/addEditor.vue
  14. 61 5
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/detail.vue
  15. 81 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/orderInfo.vue
  16. 69 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/relatedSalesOrders.vue
  17. 50 5
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/detail.vue
  18. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/newAndModifiedRelatedProducts.vue
  19. 58 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/productInfo.vue
  20. 0 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/relatedProducts.vue
  21. 181 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/addEditor.vue
  22. 21 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/tasksInfo.vue
  23. 46 4
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/detail.vue
  24. 56 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/threadInfo.vue
  25. 8 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/utility/defaultData.js
  26. 2 1
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/WxCorpInfoController.java
  27. 2 1
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java
  28. 2 1
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/task/TimingTask.java

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/assets/scss/iframe.scss

@@ -53,6 +53,6 @@ $themeColor: #075985;
 
   :deep(.van-cell__title) {
     flex: none;
-    width: 80px;
+    width: 86px;
   }
 }

+ 44 - 27
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/components/common/pullDownSelector.vue

@@ -5,47 +5,53 @@
         @update:model-value="debouncedSearchOptions" />
     </div>
     <div class="flex-1 my-2 overflow-y-auto">
-      <!-- 加载 -->
-      <template v-if="listLoading">
-        <van-skeleton :row="10" />
+      <template v-if="renderingOptions.length == 1 && renderingOptions[0] && !renderingOptions[0].label">
+        <van-empty />
       </template>
+
       <template v-else>
-        <template v-if="!multipleChoice">
-          <!-- 单选 -->
-          <van-radio-group v-model="selectChecked">
-            <template v-for="item in renderingOptions">
+        <!-- 加载 -->
+        <template v-if="listLoading">
+          <van-skeleton :row="10" />
+        </template>
+        <template v-else>
+          <template v-if="!multipleChoice">
+            <!-- 单选 -->
+            <van-radio-group v-model="selectChecked">
+              <template v-for="item in renderingOptions">
+                <van-cell-group inset>
+                  <van-cell clickable @click="selectChecked = item.value">
+                    <template #right-icon>
+                      <van-radio :name="item.value" />
+                    </template>
+                    <template #title>
+                      <TranslationComponent :openId="item.label" />
+                    </template>
+                  </van-cell>
+                </van-cell-group>
+              </template>
+            </van-radio-group>
+          </template>
+          <!-- 多选 -->
+          <template v-if="multipleChoice">
+            <van-checkbox-group v-model="selectChecked">
               <van-cell-group inset>
-                <van-cell clickable @click="selectChecked = item.value">
+                <van-cell v-for="(item, index) in renderingOptions" clickable :key="index" @click="toggle(index)">
                   <template #right-icon>
-                    <van-radio :name="item.value" />
+                    <van-checkbox :name="item.value" :ref="(el) => (checkboxRefs[index] = el)" @click.stop />
                   </template>
                   <template #title>
                     <TranslationComponent :openId="item.label" />
                   </template>
                 </van-cell>
               </van-cell-group>
-            </template>
-          </van-radio-group>
-        </template>
-        <!-- 多选 -->
-        <template v-if="multipleChoice">
-          <van-checkbox-group v-model="selectChecked">
-            <van-cell-group inset>
-              <van-cell v-for="(item, index) in renderingOptions" clickable :key="index" @click="toggle(index)">
-                <template #right-icon>
-                  <van-checkbox :name="item.value" :ref="(el) => (checkboxRefs[index] = el)" @click.stop />
-                </template>
-                <template #title>
-                  <TranslationComponent :openId="item.label" />
-                </template>
-              </van-cell>
-            </van-cell-group>
-          </van-checkbox-group>
+            </van-checkbox-group>
+          </template>
         </template>
       </template>
     </div>
     <div class="w-full pb-2 px-4">
-      <van-button type="primary" round class="w-full" :disabled="multipleChoice ? !selectChecked.length : !selectChecked" @click="confirmClick">确定</van-button>
+      <van-button type="primary" round class="w-full" :disabled="multipleChoice ? !selectChecked.length : (!selectChecked && selectChecked != 0)" @click="confirmClick">确定</van-button>
     </div>
   </div>
 </template>
@@ -88,6 +94,17 @@ const renderingOptions = ref([]);
 
 const debouncedSearchOptions = useDebounce(searchOptions, 500);
 
+watch(() => props.options, (newValue) => {
+  selectChecked.value = props.multipleChoice ? [] : null;
+  const isItAnArray = Array.isArray(newValue);
+  if (isItAnArray && newValue.length > 0) {
+    renderingOptions.value = manualCopying(newValue);
+    allOptions.value = manualCopying(newValue);
+  } else {
+    obtainPersonnelData();
+  }
+})
+
 function searchOptions(val) {
   listLoading.value = true
   if (!props.doYouNeedTranslation) {

+ 14 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js

@@ -6,10 +6,13 @@ export const GET_CUSTOM_FORM_JSON = `/sys-form/getListByCode` // 获取自定义
 export const GET_ALL_PERSONNEL = `/user/getSimpleActiveUserListNew` // 获取所有人员
 
 export const GET_A_LIST_OF_BUSINESS_OPPORTUNITIES = '/business-opportunity/list' // 获取商机列表
+export const GET_ALL_BUSINESS_OPPORTUNITIES = '/business-opportunity/getAll' // 获取所有商机
 export const GET_A_LIST_OF_CLUES = '/clue/listClue' // 获取线索列表
+export const GET_OBTAIN_ALL_CLUES = '/clue/getAll' // 获取所有线索
 export const GET_CONTACT_LIST = '/contacts/pageContacts' // 获取联系人列表
 export const GET_CUSTOMER_LIST = '/custom/list' // 获取客户列表
-export const GET_ALL_CUSTOMERS = `/custom/getAllCustom` // 获取所有客户
+export const GET_ALL_CUSTOMERS = `/custom/getAllCustom` // 获取客户列表
+export const GET_ALL_CUSTOMERSLIST = `/custom/getAll` // 获取所有客户列表 
 export const GET_TASK_LIST = '/tasks/pageTask' // 获取任务列表
 export const GET_PRODUCT_LIST = '/product/list' // 获取产品列表
 export const GET_CONTRACT_LIST = '/contract/getContractPage' // 获取合同列表
@@ -42,5 +45,14 @@ export const ORDER_ADDITION_EDITING = `/order/addOrUpdate` // 订单新增编辑
 export const PLAN_TO_ADD_EDITORS = `/visitPlan/addOrUpdateVisitPlan` // 计划新增编辑
 
 export const GET_BUSINESS_OPPORTUNITY_DETAILS = `/business-opportunity/getInfo` // 商机详情
+export const GET_CLUE_DETAILS = `/clue/getDetail` // 线索详情
+export const OBTAIN_CUSTOMER_DETAILS = `/custom/getInfo` // 获取客户想
+export const GET_CONTACT_DETAILS = `/contacts/getContactsDetail` // 获取联系人详情
+export const OBTAIN_PRODUCT_RELATED_BUSINESS_OPPORTUNITIES = `/product/businessListWithProduct` // 获取产品关联商机
+export const OBTAIN_SALES_ORDERS_RELATED_TO_THE_PRODUCT = `/product/orderWithProduct` // 获取产品关联销售订单
+export const GET_ORDER_RELATED_TASKS = `/order/taskWithOrder` // 获取销售订单关联任务
+export const OBTAIN_ORDER_RELATED_PRODUCTS = `/order/productWithOrder` // 获取销售订单关联产品
 
-export const SELL_AND_OBTAIN_RELATED_PRODUCTS = `/order/productWithOrder` // 销售订单关联产品
+export const SELL_AND_OBTAIN_RELATED_PRODUCTS = `/product/orderWithProduct` // 销售订单关联产品
+
+export const GET_CONTACTS_WITH_MORE_I_DS = `/contacts/getAllContacts` // 更具Id获取联系人

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/addEditor.vue

@@ -40,7 +40,7 @@ import requests from "@common/requests";
 import useToast from "@hooks/useToast"
 import CustomerForm from '@components/common/formForm/formView.vue'
 import FoldingPanel from '@components/common/foldingPanel.vue';
-import NewAndModifiedRelatedProducts from '@pages/pageComponents/order/newAndModifiedRelatedProducts.vue'
+import NewAndModifiedRelatedProducts from '@pages/pageComponents/product/newAndModifiedRelatedProducts.vue'
 
 const props = defineProps({
   formJson: { required: true },

+ 3 - 8
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/detail.vue

@@ -6,10 +6,10 @@
         <BusinessInfo :info="info" />
       </van-tab>
       <van-tab title="相关产品" name="相关产品">
-        <RelatedProducts :infoList="relatedProductsList" :key="componentKey" />
+        <RelatedProducts :infoList="relatedProductsList" />
       </van-tab>
       <van-tab title="相关任务" name="相关任务">
-        <RelatedTasks :infoList="relatedTasksList" :key="componentKey" />
+        <RelatedTasks :infoList="relatedTasksList" />
       </van-tab>
     </van-tabs>
   </div>
@@ -20,7 +20,7 @@ import { ref, onActivated, watch } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
 import { GET_BUSINESS_OPPORTUNITY_DETAILS } from "@hooks/useApi"
 import requests from "@common/requests";
-import RelatedProducts from '../order/relatedProducts.vue';
+import RelatedProducts from '../product/relatedProducts.vue';
 import BusinessInfo from './businessInfo.vue';
 import RelatedTasks from '../tasks/relatedTasks.vue';
 
@@ -32,7 +32,6 @@ const props = defineProps({
   }
 })
 const tabActive = ref('商机信息');
-const componentKey = ref(1);
 const relatedProductsList = ref([]);
 const relatedTasksList = ref([]);
 
@@ -45,10 +44,6 @@ function getBusinessOpportunityDetails(id) {
   requests.post(GET_BUSINESS_OPPORTUNITY_DETAILS, { id }).then(({ data }) => {
     relatedProductsList.value = data.businessItemProducts || []
     relatedTasksList.value = data.taskList || []
-  }).finally(() => {
-    setTimeout(() => {
-      componentKey.value++
-    }, 10)
   })
 }
 

+ 59 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/relatedBusinessOpportunities.vue

@@ -0,0 +1,59 @@
+<template>
+  <div class="flex flex-col h-full overflow-y-auto">
+    <div class="info h-full cellnormall" v-if="infoList.length">
+      <div v-for="(item, index) in infoList">
+        <FoldingPanel :title="`相关商机(${item.name})`">
+          <template #foldContainer>
+            <div class="p-5 bg-white ">
+              <van-cell title="商机名称" :value="item.name" />
+              <van-cell title="客户名称" :value="item.customerName" />
+              <van-cell title="负责人">
+                <template #default>
+                  <TranslationComponent :openId="item.inchargerName" />
+                </template>
+              </van-cell>
+              <van-cell title="商机金额" :value="item.amountOfMoney">
+                <template #default>
+                  <span class="text-[#FF8B32]" v-if="item.amountOfMoney">¥ {{ item.amountOfMoney }}</span>
+                </template>
+              </van-cell>
+              <van-cell title="预计成交时间" :value="item.expectedTransactionDate" />
+              <van-cell title="商机阶段" :value="item.stageValue" />
+              <van-cell title="预计成交时间" :value="item.creatorName" />
+            </div>
+          </template>
+        </FoldingPanel>
+      </div>
+    </div>
+    <div v-else class="items-justify-center h-2/3">
+      <van-empty description="暂无商机" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+import { fixedFieldPriority, fixedFieldTaskStatus } from "@utility/defaultData.js"
+import FoldingPanel from '@components/common/foldingPanel.vue';
+
+const props = defineProps({
+  infoList: {
+    type: Array,
+    required: true,
+    default: () => ([])
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+.info {
+  margin: 8px 14px 30px 14px;
+}
+</style>

+ 53 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/contactsInfo.vue

@@ -0,0 +1,53 @@
+<template>
+  <div class="flex flex-col h-full">
+    <div class="bg-white info flex-1 overflow-y-auto cellnormall">
+      <van-cell title="联系人姓名" :value="info.name" />
+      <van-cell title="电话" :value="info.phone" />
+      <van-cell title="邮箱" :value="info.email" />
+      <van-cell title="职务" :value="info.position" />
+      <van-cell title="地址" :value="info.address" />
+      <van-cell title="性别" :value="info.phone == 1 ? '男' : '女'" />
+      <van-cell title="负责人">
+        <template #default>
+          <TranslationComponent :openId="info.ownerName" />
+        </template>
+      </van-cell>
+      <van-cell title="备注" :value="info.remark" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+.bottomButton {
+  margin: 0 14px;
+  padding-bottom: 30px;
+
+  :deep(.van-button) {
+    margin-bottom: 20px;
+  }
+}
+
+.info {
+  margin: 8px 14px 30px 14px;
+  padding: 14px;
+}
+</style>

+ 48 - 5
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/detail.vue

@@ -1,20 +1,63 @@
 <template>
   <div class="w-full h-full">
-    联系人详情
+    <van-tabs v-model:active="tabActive">
+      <van-tab title="联系人信息" name="联系人信息">
+        <ContactsInfo :info="info" />
+      </van-tab>
+      <van-tab title="相关任务" name="相关任务">
+        <RelatedTasks :infoList="relatedTasksList" />
+      </van-tab>
+      <van-tab title="相关商机" name="相关商机">
+        <RelatedBusinessOpportunities :infoList="relatedBusinessOpportunitiesList"  />
+      </van-tab>
+    </van-tabs>
   </div>
 </template>
 
 <script setup>
-import { ref } from 'vue';
+import { ref, onActivated, watch } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { GET_CONTACT_DETAILS } from "@hooks/useApi"
+import requests from "@common/requests";
+import ContactsInfo from './contactsInfo.vue';
+import RelatedTasks from '../tasks/relatedTasks.vue';
+import RelatedBusinessOpportunities from '../business/relatedBusinessOpportunities.vue';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+const tabActive = ref('联系人信息');
+const relatedBusinessOpportunitiesList = ref([]);
+const relatedTasksList = ref([]);
+
+watch(() => props.info, (newValue) => {
+  tabActive.value = '联系人信息';
+  processingData(newValue.id)
+})
+
+function getDetailedData(id) {
+  requests.post(GET_CONTACT_DETAILS, { id }).then(({ data }) => {
+    relatedBusinessOpportunitiesList.value = data.businessOpportunityList || []
+    relatedTasksList.value = data.taskList || []
+  })
+}
+
+function processingData(id) {
+  getDetailedData(id)
+}
 
 useLifecycle({
-  load: () => {
-    // 添加加载逻辑
+  init: () => {
+    tabActive.value = '联系人信息';
+    processingData(props.info.id)
   }
 });
 </script>
 
 <style lang='scss' scoped>
-  /* 样式代码 */
+/* 样式代码 */
 </style>

+ 54 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/relatedContacts.vue

@@ -0,0 +1,54 @@
+<template>
+  <div class="flex flex-col h-full overflow-y-auto">
+    <div class="info h-full cellnormall" v-if="infoList.length">
+      <div v-for="(item, index) in infoList">
+        <FoldingPanel :title="`相关联系人(${item.name})`">
+          <template #foldContainer>
+            <div class="p-5 bg-white ">
+              <van-cell title="联系人姓名" :value="item.name" />
+              <van-cell title="电话" :value="item.phone" />
+              <van-cell title="邮箱" :value="item.email" />
+              <van-cell title="职务" :value="item.position" />
+              <van-cell title="性别" :value="item.phone == 1 ? '男' : '女'" />
+              <van-cell title="负责人">
+                <template #default>
+                  <TranslationComponent :openId="item.ownerName" />
+                </template>
+              </van-cell>
+            </div>
+          </template>
+        </FoldingPanel>
+      </div>
+    </div>
+    <div v-else class="items-justify-center h-2/3">
+      <van-empty description="暂无联系人" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+import { fixedFieldPriority, fixedFieldTaskStatus } from "@utility/defaultData.js"
+import FoldingPanel from '@components/common/foldingPanel.vue';
+
+const props = defineProps({
+  infoList: {
+    type: Array,
+    required: true,
+    default: () => ([])
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+.info {
+  margin: 8px 14px 30px 14px;
+}
+</style>

+ 60 - 3
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contract/detail.vue

@@ -1,12 +1,57 @@
 <template>
-  <div class="w-full h-full">
-    合同详情
+  <div class="flex flex-col h-full">
+    <div class="bg-white info flex-1 overflow-y-auto cellnormall">
+      <van-cell title="合同编号" :value="info.number" />
+      <van-cell title="合同名称" :value="info.name" />
+      <van-cell title="合同金额" :value="info.amounts">
+        <template #default>
+          <span class="text-[#FF8B32]" v-if="info.amounts">¥ {{ info.amounts }}</span>
+        </template>
+      </van-cell>
+      <van-cell title="已回款金额" :value="info.payment">
+        <template #default>
+          <span class="text-[#FF8B32]" v-if="info.payment">¥ {{ info.payment }}</span>
+        </template>
+      </van-cell>
+      <van-cell title="已回款进度" :value="info.payment">
+        <template #default>
+          {{ info.payment ? (100 * info.payment / info.amounts).toFixed(1) + '%' : '0%' }}
+        </template>
+      </van-cell>
+      <van-cell title="下笔回款日期" :value="info.nextPaymentDate">
+        <template #default>
+          {{ info.nextPaymentDate ? info.nextPaymentDate : '-' }}
+        </template>
+      </van-cell>
+      <van-cell title="下笔回款金额" :value="info.payment">
+        <template #default>
+          <span class="text-[#FF8B32]" v-if="info.payment">¥ {{ info.payment.toFixed(2) }}</span>
+        </template>
+      </van-cell>
+      <van-cell title="合同类型" :value="info.typeName" />
+      <van-cell title="状态" :value="info.status">
+        <template #default>
+          <span :style="fixedFieldStatusArray[info.status].color">
+            {{ fixedFieldStatusArray[info.status].label }}
+          </span>
+        </template>
+      </van-cell>
+    </div>
   </div>
 </template>
 
 <script setup>
 import { ref } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { fixedFieldStatusArray } from '@/utility/defaultData.js';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
 
 useLifecycle({
   load: () => {
@@ -16,5 +61,17 @@ useLifecycle({
 </script>
 
 <style lang='scss' scoped>
-  /* 样式代码 */
+.bottomButton {
+  margin: 0 14px;
+  padding-bottom: 30px;
+
+  :deep(.van-button) {
+    margin-bottom: 20px;
+  }
+}
+
+.info {
+  margin: 8px 14px 30px 14px;
+  padding: 14px;
+}
 </style>

+ 56 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/customerInfo.vue

@@ -0,0 +1,56 @@
+<template>
+  <div class="flex flex-col h-full">
+    <div class="bg-white info flex-1 overflow-y-auto cellnormall">
+      <van-cell title="客户名称" :value="info.customName" />
+      <van-cell title="客户来源" :value="info.customSourceValue" />
+      <van-cell title="电话号码" :value="info.telPhone" />
+      <van-cell title="邮箱" :value="info.email" />
+      <van-cell title="客户行业" :value="info.customerIndustryValue" />
+      <van-cell title="客户级别" :value="info.customerLevelValue" />
+      <van-cell title="客户地址" :value="info.address" />
+      <van-cell title="负责人">
+        <template #default>
+          <TranslationComponent :openId="info.inchargerName" />
+        </template>
+      </van-cell>
+      <van-cell title="备注" :value="info.customDesc" />
+    </div>
+    <div class="bottomButton">
+      <van-button type="primary" class="w-full block">关联联系人</van-button>
+      <van-button type="warning" class="w-full block">转移商机</van-button>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+  .bottomButton {
+    margin: 0 14px;
+    padding-bottom: 30px;
+    :deep(.van-button) {
+      margin-bottom: 20px;
+    }
+  }
+  .info {
+    margin: 8px 14px 30px 14px;
+    padding: 14px;
+  }
+</style>

+ 60 - 5
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/detail.vue

@@ -1,20 +1,75 @@
 <template>
   <div class="w-full h-full">
-    客户详情
+    <van-tabs v-model:active="tabActive" swipe-threshold="3">
+      <van-tab title="客户信息" name="客户信息">
+        <CustomerInfo :info="info" />
+      </van-tab>
+      <van-tab title="相关任务" name="相关任务">
+        <RelatedTasks :infoList="relatedTasksList" />
+      </van-tab>
+      <van-tab title="相关联系人" name="相关联系人">
+        <RelatedContacts :infoList="relatedContactsList" />
+      </van-tab>
+      <van-tab title="相关商机" name="相关商机">
+        <RelatedBusinessOpportunities :infoList="relatedBusinessOpportunitiesList" />
+      </van-tab>
+      <van-tab title="相关销售订单" name="相关销售订单">
+        <RelatedSalesOrders :infoList="relatedSalesOrdersList" />
+      </van-tab>
+    </van-tabs>
   </div>
 </template>
 
 <script setup>
-import { ref } from 'vue';
+import { ref, onActivated, watch } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { OBTAIN_CUSTOMER_DETAILS } from "@hooks/useApi"
+import requests from "@common/requests";
+import CustomerInfo from './customerInfo.vue';
+import RelatedTasks from '../tasks/relatedTasks.vue';
+import RelatedContacts from '../contacts/relatedContacts.vue';
+import RelatedBusinessOpportunities from '../business/relatedBusinessOpportunities.vue';
+import RelatedSalesOrders from '../order/relatedSalesOrders.vue';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+const tabActive = ref('客户信息');
+const relatedTasksList = ref([]);
+const relatedContactsList = ref([]);
+const relatedBusinessOpportunitiesList = ref([]);
+const relatedSalesOrdersList = ref([]);
+
+watch(() => props.info, (newValue) => {
+  tabActive.value = '客户信息';
+  processingData(newValue.id)
+})
+
+function getDetailedData(id) {
+  requests.post(OBTAIN_CUSTOMER_DETAILS, { id }).then(({ data }) => {
+    relatedTasksList.value = data.tasks || []
+    relatedContactsList.value = data.contacts || []
+    relatedBusinessOpportunitiesList.value = data.businessOpportunitys || []
+    relatedSalesOrdersList.value = data.salesOrders || []
+  })
+}
+
+function processingData(id) {
+  getDetailedData(id)
+}
 
 useLifecycle({
-  load: () => {
-    // 添加加载逻辑
+  init: () => {
+    tabActive.value = '客户信息';
+    processingData(props.info.id)
   }
 });
 </script>
 
 <style lang='scss' scoped>
-  /* 样式代码 */
+/* 样式代码 */
 </style>

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/addEditor.vue

@@ -45,7 +45,7 @@ import requests from "@common/requests";
 import useToast from "@hooks/useToast"
 import FoldingPanel from '@components/common/foldingPanel.vue';
 import CustomerForm from '@components/common/formForm/formView.vue'
-import NewAndModifiedRelatedProducts from '@pages/pageComponents/order/newAndModifiedRelatedProducts.vue'
+import NewAndModifiedRelatedProducts from '@pages/pageComponents/product/newAndModifiedRelatedProducts.vue'
 
 const { toastText, toastSuccess, toastFail, toastLoading } = useToast()
 const props = defineProps({

+ 61 - 5
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/detail.vue

@@ -1,20 +1,76 @@
 <template>
   <div class="w-full h-full">
-    销售订单详情
+    <van-tabs v-model:active="tabActive">
+      <van-tab title="销售订单信息" name="销售订单信息">
+        <OrderInfo :info="info" />
+      </van-tab>
+      <van-tab title="相关任务" name="相关任务">
+        <RelatedTasks :infoList="relatedTasksList"  />
+      </van-tab>
+      <van-tab title="相关产品" name="相关产品">
+        <RelatedProducts :infoList="relatedProductsList" />
+      </van-tab>
+    </van-tabs>
   </div>
 </template>
 
 <script setup>
-import { ref } from 'vue';
+import { ref, onActivated, watch } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { GET_ORDER_RELATED_TASKS, OBTAIN_ORDER_RELATED_PRODUCTS } from "@hooks/useApi"
+import requests from "@common/requests";
+import OrderInfo from './orderInfo.vue';
+import RelatedTasks from '../tasks/relatedTasks.vue';
+import RelatedProducts from '../product/relatedProducts.vue';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+const tabActive = ref('销售订单信息');
+const relatedTasksList = ref([]);
+const relatedProductsList = ref([]);
+
+watch(() => props.info, (newValue) => {
+  tabActive.value = '销售订单信息';
+  processingData(newValue.id)
+})
+
+function getDetailedData(id) {
+  requests.post(GET_ORDER_RELATED_TASKS, { id }).then(({ data }) => {
+    relatedTasksList.value = data || []
+  })
+  requests.post(OBTAIN_ORDER_RELATED_PRODUCTS, { id }).then(({ data }) => {
+    const list = (data || []).map((item) => {
+      const { id, productName, productCode, unit, unitName, typeName, type, price, inventory, orderProductDetail } = item
+      return {
+        id, productId: id, productName, productCode, unit, unitName, typeName, type, price, inventory,
+        productType: typeName,
+        quantity: +orderProductDetail?.num,
+        discount: +orderProductDetail?.discount,
+        sellingPrice: +orderProductDetail?.sealPrice,
+        totalPrice: +orderProductDetail?.totalPrice
+      }
+    })
+    relatedProductsList.value = list
+  })
+}
+
+function processingData(id) {
+  getDetailedData(id)
+}
 
 useLifecycle({
-  load: () => {
-    // 添加加载逻辑
+  init: () => {
+    tabActive.value = '销售订单信息';
+    processingData(props.info.id)
   }
 });
 </script>
 
 <style lang='scss' scoped>
-  /* 样式代码 */
+/* 样式代码 */
 </style>

+ 81 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/orderInfo.vue

@@ -0,0 +1,81 @@
+<template>
+  <div class="flex flex-col h-full">
+    <div class="bg-white info flex-1 overflow-y-auto cellnormall">
+      <van-cell title="订单编号" :value="info.orderCode" />
+      <van-cell title="订单名称" :value="info.orderName" />
+      <van-cell title="客户名称" :value="info.customName" />
+      <van-cell title="商机名称" :value="info.businessOpportunityName" />
+      <van-cell title="订单金额" :value="info.price">
+        <template #default>
+          <span class="text-[#FF8B32]" v-if="info.price">¥ {{ info.price }}</span>
+        </template>
+      </van-cell>
+      <van-cell title="回款状态" :value="info.receivedStatus" />
+      <van-cell title="已回款金额" :value="info.receivedPayment">
+        <template #default>
+          <span class="text-[#FF8B32]" v-if="info.receivedPayment">¥ {{ info.receivedPayment }}</span>
+        </template>
+      </van-cell>
+      <van-cell title="未回款" :value="info.unReceivedPayment">
+        <template #default>
+          <span class="text-[#FF8B32]" v-if="info.unReceivedPayment">¥ {{ info.unReceivedPayment }}</span>
+        </template>
+      </van-cell>
+      <van-cell title="订单类型" :value="info.type" />
+      <van-cell title="下单时间" :value="info.placeTime" />
+      <van-cell title="订单开始时间" :value="info.orderStartDate" />
+      <van-cell title="订单结束时间" :value="info.orderEndDate" />
+      <van-cell title="负责人">
+        <template #default>
+          <TranslationComponent :openId="info.inchargerName" />
+        </template>
+      </van-cell>
+      <van-cell title="客户签约人">
+        <template #default>
+          <TranslationComponent :openId="info.customSignerName" />
+        </template>
+      </van-cell>
+      <van-cell title="公司签约人">
+        <template #default>
+          <TranslationComponent :openId="info.companySignerName" />
+        </template>
+      </van-cell>
+      <van-cell title="备注" :value="info.remark" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+.bottomButton {
+  margin: 0 14px;
+  padding-bottom: 30px;
+
+  :deep(.van-button) {
+    margin-bottom: 20px;
+  }
+}
+
+.info {
+  margin: 8px 14px 30px 14px;
+  padding: 14px;
+}
+</style>

+ 69 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/relatedSalesOrders.vue

@@ -0,0 +1,69 @@
+<template>
+  <div class="flex flex-col h-full overflow-y-auto">
+    <div class="info h-full cellnormall" v-if="infoList.length">
+      <div v-for="(item, index) in infoList">
+        <FoldingPanel :title="`相关销售订单(${item.orderName})`">
+          <template #foldContainer>
+            <div class="p-5 bg-white ">
+              <van-cell title="订单编号" :value="item.orderCode" />
+              <van-cell title="订单名称" :value="item.orderName" />
+              <van-cell title="客户名称" :value="item.customName" />
+              <van-cell title="订单金额" :value="item.price">
+                <template #default>
+                  <span class="text-[#FF8B32]" v-if="item.price">¥ {{ item.price }}</span>
+                </template>
+              </van-cell>
+              <van-cell title="已回款" :value="item.receivedPayment">
+                <template #default>
+                  <span class="text-[#FF8B32]" v-if="item.receivedPayment">¥ {{ item.receivedPayment }}</span>
+                </template>
+              </van-cell>
+              <van-cell title="未回款" :value="item.unReceivedPayment">
+                <template #default>
+                  <span class="text-[#FF8B32]" v-if="item.unReceivedPayment">¥ {{ item.unReceivedPayment }}</span>
+                </template>
+              </van-cell>
+              <van-cell title="订单类型" :value="item.typeName" />
+              <van-cell title="下单时间" :value="item.placeTime" />
+              <van-cell title="负责人">
+                <template #default>
+                  <TranslationComponent :openId="item.inchargerName" />
+                </template>
+              </van-cell>
+            </div>
+          </template>
+        </FoldingPanel>
+      </div>
+    </div>
+    <div v-else class="items-justify-center h-2/3">
+      <van-empty description="暂无销售订单" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+import { fixedFieldPriority, fixedFieldTaskStatus } from "@utility/defaultData.js"
+import FoldingPanel from '@components/common/foldingPanel.vue';
+
+const props = defineProps({
+  infoList: {
+    type: Array,
+    required: true,
+    default: () => ([])
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+.info {
+  margin: 8px 14px 30px 14px;
+}
+</style>

+ 50 - 5
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/detail.vue

@@ -1,20 +1,65 @@
 <template>
   <div class="w-full h-full">
-    产品详情
+    <van-tabs v-model:active="tabActive">
+      <van-tab title="产品信息" name="产品信息">
+        <ProductInfo :info="info" />
+      </van-tab>
+      <van-tab title="相关商机" name="相关商机">
+        <RelatedBusinessOpportunities :infoList="relatedBusinessOpportunitiesList"  />
+      </van-tab>
+      <van-tab title="相关销售订单" name="相关销售订单">
+        <RelatedSalesOrders :infoList="relatedSalesOrdersList" />
+      </van-tab>
+    </van-tabs>
   </div>
 </template>
 
 <script setup>
-import { ref } from 'vue';
+import { ref, onActivated, watch } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { OBTAIN_PRODUCT_RELATED_BUSINESS_OPPORTUNITIES, OBTAIN_SALES_ORDERS_RELATED_TO_THE_PRODUCT } from "@hooks/useApi"
+import requests from "@common/requests";
+import ProductInfo from './productInfo.vue';
+import RelatedSalesOrders from '../order/relatedSalesOrders.vue';
+import RelatedBusinessOpportunities from '../business/relatedBusinessOpportunities.vue';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+const tabActive = ref('产品信息');
+const relatedBusinessOpportunitiesList = ref([]);
+const relatedSalesOrdersList = ref([]);
+
+watch(() => props.info, (newValue) => {
+  tabActive.value = '产品信息';
+  processingData(newValue.id)
+})
+
+function getDetailedData(id) {
+  requests.post(OBTAIN_PRODUCT_RELATED_BUSINESS_OPPORTUNITIES, { id }).then(({ data }) => {
+    relatedBusinessOpportunitiesList.value = data || []
+  })
+  requests.post(OBTAIN_SALES_ORDERS_RELATED_TO_THE_PRODUCT, { id }).then(({ data }) => {
+    relatedSalesOrdersList.value = data || []
+  })
+}
+
+function processingData(id) {
+  getDetailedData(id)
+}
 
 useLifecycle({
-  load: () => {
-    // 添加加载逻辑
+  init: () => {
+    tabActive.value = '产品信息';
+    processingData(props.info.id)
   }
 });
 </script>
 
 <style lang='scss' scoped>
-  /* 样式代码 */
+/* 样式代码 */
 </style>

fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/newAndModifiedRelatedProducts.vue → fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/newAndModifiedRelatedProducts.vue


+ 58 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/productInfo.vue

@@ -0,0 +1,58 @@
+<template>
+  <div class="flex flex-col h-full">
+    <div class="bg-white info flex-1 overflow-y-auto cellnormall">
+      <van-cell title="产品编号" :value="info.productCode" />
+      <van-cell title="产品名称" :value="info.productName" />
+      <van-cell title="产品类别" :value="info.typeName" />
+      <van-cell title="单位" :value="info.unitName" />
+      <van-cell title="标准价格" :value="info.price">
+        <template #default>
+          <span class="text-[#FF8B32]" v-if="info.price">¥ {{ info.price }}</span>
+        </template>
+      </van-cell>
+      <van-cell title="库存" :value="info.unit" />
+      <van-cell title="状态" :value="info.status == 1 ? '上家' : '下架'" />
+      <van-cell title="负责人">
+        <template #default>
+          <TranslationComponent :openId="info.inchargerName" />
+        </template>
+      </van-cell>
+      <van-cell title="备注" :value="info.descs" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+.bottomButton {
+  margin: 0 14px;
+  padding-bottom: 30px;
+
+  :deep(.van-button) {
+    margin-bottom: 20px;
+  }
+}
+
+.info {
+  margin: 8px 14px 30px 14px;
+  padding: 14px;
+}
+</style>

fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/relatedProducts.vue → fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/relatedProducts.vue


+ 181 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/addEditor.vue

@@ -1,6 +1,66 @@
 <template>
   <div class="w-full h-full flex flex-col">
     <div class="flex-1 overflow-y-auto">
+      <van-form ref="vanFormRef" show-error :show-error-message="false" label-align="left" input-align="right"
+        class="bg-white" @submit="onSubmit">
+        <van-field v-model="vantFormVal.taskName" name="taskName" rows="2" label="任务名称" maxlength="100" required
+          show-word-limit type="textarea" placeholder="请输入" />
+        <van-field v-model="vantFormVal.priority" name="priority" label="优先级" placeholder="请选择" is-link readonly
+          required @click="showSelectionBox('priority', fixedFieldPriority)">
+          <template #input v-if="vantFormVal.priority || vantFormVal.priority == 0">
+            {{ vantFormVal.priorityName }}
+          </template>
+        </van-field>
+        <van-field v-model="vantFormVal.taskType" name="taskType" label="任务类型" placeholder="请选择" is-link readonly
+          @click="showSelectionBox('taskType', fixedFieldTaskType)" class="resetStyles">
+          <template #input v-if="vantFormVal.taskType || vantFormVal.taskType == 0">
+            {{ vantFormVal.taskTypeName }}
+          </template>
+        </van-field>
+        <!-- 客户选择 -->
+        <template v-if="vantFormVal.taskType == 0">
+          <van-field v-model="vantFormVal.customId" name="customId" label="客户" placeholder="请选择" is-link readonly
+            @click="showSelectionBox('customId', allCustomersList)" class="resetStyles">
+            <template #input v-if="vantFormVal.customId">
+              {{ vantFormVal.customIdName }}
+            </template>
+          </van-field>
+        </template>
+        <!-- 商机选择 -->
+        <template v-if="vantFormVal.taskType == 1">
+          <van-field v-model="vantFormVal.businessOpportunityId" name="businessOpportunityId" label="商机"
+            placeholder="请选择" is-link readonly class="resetStyles"
+            @click="showSelectionBox('businessOpportunityId', allBusinessOpportunities)">
+            <template #input v-if="vantFormVal.businessOpportunityId">
+              {{ vantFormVal.businessOpportunityIdName }}
+            </template>
+          </van-field>
+        </template>
+        <!-- 销售订单选择 -->
+        <template v-if="vantFormVal.taskType == 2">
+          <van-field v-model="vantFormVal.orderId" name="orderId" label="销售订单" placeholder="请选择" is-link readonly
+            class="resetStyles" @click="showSelectionBox('orderId', allSalesOrdersList)">
+            <template #input v-if="vantFormVal.orderId">
+              {{ vantFormVal.orderIdName }}
+            </template>
+          </van-field>
+        </template>
+        <!-- 线索选择 -->
+        <template v-if="vantFormVal.taskType == 3">
+          <van-field v-model="vantFormVal.clueId" name="clueId" label="线索" placeholder="请选择" is-link readonly
+            class="resetStyles" @click="showSelectionBox('clueId', allCluesList)">
+            <template #input v-if="vantFormVal.clueId">
+              {{ vantFormVal.clueIdName }}
+            </template>
+          </van-field>
+        </template>
+        <van-field v-model="vantFormVal.contactsId" name="contactsId" label="联系人" placeholder="请选择" is-link readonly :disabled="contactDisabled" v-if="fixedFieldTaskType.find(v => v.value == (vantFormVal.taskType || '1'))?.show"
+          class="resetStyles" @click="showSelectionBox('contactsId', allContactsList)">
+          <template #input v-if="vantFormVal.contactsId">
+            {{ vantFormVal.contactsIdName }}
+          </template>
+        </van-field>
+      </van-form>
       <CustomerForm ref="formFormRef" :formJson="formJson" :formValue="formVal"></CustomerForm>
     </div>
     <div class="mar-20px ">
@@ -8,12 +68,24 @@
         {{ Object.keys(formVal).length > 0 ? '确定修改' : '确定添加' }}
       </van-button>
     </div>
+
+    <!-- 选择器 -->
+    <div>
+      <!-- 正常下拉框选择 -->
+      <van-popup v-model:show="showSelectionFlag" destroy-on-close position="bottom" :style="{ height: '80%' }">
+        <PullDownSelector :options="showSelectionArray" :doYouNeedTranslation="false" @change="selectChange" />
+      </van-popup>
+    </div>
   </div>
 </template>
 
 <script setup>
-import { ref, onActivated } from 'vue';
+import { ref, onActivated, computed } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { fixedFieldTaskType, fixedFieldPriority } from '@utility/defaultData.js';
+import { GET_ALL_CUSTOMERSLIST, GET_ALL_BUSINESS_OPPORTUNITIES, GET_SALES_ORDER_LIST, GET_OBTAIN_ALL_CLUES, GET_CONTACTS_WITH_MORE_I_DS } from "@hooks/useApi";
+import requests from "@common/requests";
+import PullDownSelector from '@components/common/pullDownSelector.vue'
 import CustomerForm from '@components/common/formForm/formView.vue'
 
 const props = defineProps({
@@ -22,7 +94,28 @@ const props = defineProps({
 });
 
 const formFormRef = ref(null)
+const vantFormVal = ref({
+  taskType: 0,
+  taskTypeName: '客户'
+})
 const formVal = ref({})
+const allBusinessOpportunities = ref([])
+const allCustomersList = ref([])
+const allCluesList = ref([])
+const allSalesOrdersList = ref([])
+const allContactsList = ref([])
+const showSelectionFlag = ref(false)
+const showSelectionFiled = ref([])
+const showSelectionArray = ref([])
+const taskTypeFiled = ['customId', 'businessOpportunityId', 'orderId', 'clueId']
+
+const contactDisabled = computed(() => {
+  const taskType = vantFormVal.value?.taskType
+  if(!taskType && taskType != 0) {
+    return true
+  }
+  return false
+})
 
 function onSubmit() {
   formFormRef.value.getJsonData().then((res) => {
@@ -30,17 +123,103 @@ function onSubmit() {
   })
 }
 
+function selectChange(value, label) {
+  if (taskTypeFiled.includes(showSelectionFiled.value)) {
+    const item = fixedFieldTaskType.find(item => item.value == vantFormVal.value.taskType)
+    console.log(item, value, )
+    if (item && item.show) {
+      getContactData(showSelectionFiled.value, value)
+    }
+  }
+  vantFormVal.value[showSelectionFiled.value] = value
+  vantFormVal.value[`${showSelectionFiled.value}Name`] = label
+  showSelectionFlag.value = false
+}
+
+function showSelectionBox(filed, list = [], event) {
+  if (taskTypeFiled.includes(filed)) {
+    const fileds = taskTypeFiled.filter(item => item !== filed)
+    fileds.forEach(item => {
+      vantFormVal.value[item] = ''
+      vantFormVal.value[`${item}Name`] = ''
+    })
+    vantFormVal.value.contactsId = ''
+    vantFormVal.value[`contactsIdName`] = ''
+  }
+  showSelectionFiled.value = filed
+  showSelectionArray.value = list
+  showSelectionFlag.value = true
+}
+
+function getContactData(filed, value) {
+  const urlType = {
+    'customId': 'customerId',
+    'businessOpportunityId': 'businessId',
+    'orderId': 'salesId',
+  }
+  const url = `${GET_CONTACTS_WITH_MORE_I_DS}?${urlType[filed]}=${value}`
+  requests.get(url).then(({ data = [] }) => {
+    let list = data.map(item => {
+      return {
+        label: item.name,
+        value: item.id,
+      }
+    })
+    if(!allContactsList.value.length) {
+      list = [{}]
+    }
+    allContactsList.value = list
+  })
+}
+
+function getAllListData() {
+  requests.post(GET_ALL_CUSTOMERSLIST, {}).then(res => {
+    allCustomersList.value = res.data.map(item => {
+      return {
+        label: item.customName,
+        value: item.id,
+      }
+    })
+  })
+  requests.post(GET_ALL_BUSINESS_OPPORTUNITIES, {}).then(res => {
+    allBusinessOpportunities.value = res.data.map(item => {
+      return {
+        label: item.name,
+        value: item.id,
+      }
+    })
+  })
+  requests.post(GET_SALES_ORDER_LIST, { pageIndex: -1, pageSize: -1 }).then(({ data }) => {
+    allSalesOrdersList.value = (data.record || []).map(item => {
+      return {
+        label: item.orderName,
+        value: item.id,
+      }
+    })
+  })
+  requests.post(GET_OBTAIN_ALL_CLUES, {}).then(res => {
+    allCluesList.value = res.data.map(item => {
+      return {
+        label: item.clueName,
+        value: item.id,
+      }
+    })
+  })
+}
+
 useLifecycle({
   load: () => {
     formVal.value = props.formValue
+    getAllListData()
   },
   init: () => {
     formVal.value = props.formValue
+    getAllListData()
   }
 });
 
 onActivated(() => {
-  
+
 })
 </script>
 

+ 21 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/tasksInfo.vue

@@ -0,0 +1,21 @@
+<template>
+  <Page title='任务详情'>
+    <template v-slot:body>
+    </template>
+  </Page>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+  /* 样式代码 */
+</style>

+ 46 - 4
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/detail.vue

@@ -1,16 +1,58 @@
 <template>
   <div class="w-full h-full">
-    线索详情
+    <van-tabs v-model:active="tabActive">
+      <van-tab title="线索信息">
+        <ThreadInfo :info="info" />
+      </van-tab>
+      <van-tab title="相关任务" name="相关任务">
+        <RelatedTasks :infoList="relatedTasksList" :key="componentKey" />
+      </van-tab>
+    </van-tabs>
   </div>
 </template>
 
 <script setup>
-import { ref } from 'vue';
+import { ref, watch } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { GET_CLUE_DETAILS } from "@hooks/useApi"
+import requests from "@common/requests";
+import ThreadInfo from './threadInfo.vue';
+import RelatedTasks from '../tasks/relatedTasks.vue';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+const tabActive = ref('线索信息');
+const componentKey = ref(1);
+const relatedTasksList = ref([]);
+
+watch(() => props.info, (newValue) => {
+  tabActive.value = '线索信息';
+  processingData(newValue.id)
+})
+
+function getDetails(id) {
+  requests.post(GET_CLUE_DETAILS, { id }).then(({ data }) => {
+    relatedTasksList.value = data.taskList || []
+  }).finally(() => {
+    setTimeout(() => {
+      componentKey.value++
+    }, 10)
+  })
+}
+
+function processingData(id) {
+  getDetails(id)
+}
 
 useLifecycle({
-  load: () => {
-    // 添加加载逻辑
+  init: () => {
+    tabActive.value = '线索信息';
+    processingData(props.info.id)
   }
 });
 </script>

+ 56 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/threadInfo.vue

@@ -0,0 +1,56 @@
+<template>
+  <div class="flex flex-col h-full">
+    <div class="bg-white info flex-1 overflow-y-auto cellnormall">
+      <van-cell title="线索名称" :value="info.clueName" />
+      <van-cell title="线索来源" :value="info.clueSourceValue" />
+      <van-cell title="电话号码" :value="info.phone" />
+      <van-cell title="邮箱" :value="info.email" />
+      <van-cell title="客户行业" :value="info.customerIndustryValue" />
+      <van-cell title="客户级别" :value="info.customerLevelValue" />
+      <van-cell title="客户地址" :value="info.address" />
+      <van-cell title="负责人">
+        <template #default>
+          <TranslationComponent :openId="info.inchargerName" />
+        </template>
+      </van-cell>
+      <van-cell title="备注" :value="info.remark" />
+    </div>
+    <div class="bottomButton">
+      <van-button type="primary" class="w-full block">转移线索</van-button>
+      <van-button type="warning" class="w-full block">转为商机</van-button>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { useLifecycle } from '@hooks/useCommon.js';
+
+const props = defineProps({
+  info: {
+    type: Object,
+    required: true,
+    default: () => ({})
+  }
+})
+
+useLifecycle({
+  load: () => {
+    // 添加加载逻辑
+  }
+});
+</script>
+
+<style lang='scss' scoped>
+  .bottomButton {
+    margin: 0 14px;
+    padding-bottom: 30px;
+    :deep(.van-button) {
+      margin-bottom: 20px;
+    }
+  }
+  .info {
+    margin: 8px 14px 30px 14px;
+    padding: 14px;
+  }
+</style>

+ 8 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/utility/defaultData.js

@@ -34,4 +34,11 @@ export const fixedFieldTaskStatus = [
   { label: "进行中", value: "1", type: "primary" },
   { label: "已完成", value: "2", type: "success" },
   { label: "已超时", value: "3", type: "danger" },
-];
+];
+
+// 合同状态
+export const fixedFieldStatusArray = [
+  { label: "审核通过", value: "0", color: "color:#67c23a;" },
+  { label: "待审核", value: "1", color: "color:#e6a23c;" },
+  { label: "已驳回", value: "2", color: "color:#f56c6c;" },
+]

+ 2 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/WxCorpInfoController.java

@@ -219,7 +219,8 @@ public class WxCorpInfoController {
         HttpRespMsg msg=new HttpRespMsg();
         JSONArray jsonArrayFilter = new JSONArray();
         JSONObject filter1 = new JSONObject();
-        WxCorpTemplate template = wxCorpTemplateService.getById(7);
+//        WxCorpTemplate template = wxCorpTemplateService.getById(7);
+        WxCorpTemplate template = wxCorpTemplateService.getOne(new QueryWrapper<WxCorpTemplate>().eq("company_id",7).eq("type",1));
         filter1.put("key","template_id");
         filter1.put("value",template.getTemplateId());
         jsonArrayFilter.add(filter1);

+ 2 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -2060,7 +2060,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     @Override
     public String getTemplateDetail(Integer companyId) throws Exception {
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",companyId));
-        WxCorpTemplate template = wxCorpTemplateService.getById(wxCorpInfo.getCompanyId());
+//        WxCorpTemplate template = wxCorpTemplateService.getById(wxCorpInfo.getCompanyId());
+        WxCorpTemplate template = wxCorpTemplateService.getOne(new QueryWrapper<WxCorpTemplate>().eq("company_id",7).eq("type",1));
         String url=GET_TEMPLATE_DETAIL.replace("ACCESS_TOKEN",getCorpAgentAccessToken(wxCorpInfo));
         HttpHeaders headers = new HttpHeaders();
         RestTemplate restTemplate = new RestTemplate();

+ 2 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/task/TimingTask.java

@@ -362,7 +362,8 @@ public class TimingTask {
         LocalDate end=LocalDate.now();
         JSONArray jsonArrayFilter = new JSONArray();
         JSONObject filter1 = new JSONObject();
-        WxCorpTemplate template = wxCorpTemplateService.getById(7);
+//        WxCorpTemplate template = wxCorpTemplateService.getById(7);
+        WxCorpTemplate template = wxCorpTemplateService.getOne(new QueryWrapper<WxCorpTemplate>().eq("company_id",7).eq("type",1));
         filter1.put("key","template_id");
         filter1.put("value",template.getTemplateId());
         jsonArrayFilter.add(filter1);