Browse Source

提交相关代码

Lijy 5 months ago
parent
commit
a1a3ad0d9c
23 changed files with 836 additions and 40 deletions
  1. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/assets/scss/iframe.scss
  2. 8 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js
  3. 3 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/moduleList/moduleList.vue
  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. 46 4
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/detail.vue
  22. 56 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/threadInfo.vue
  23. 8 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/utility/defaultData.js

+ 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;
   }
 }

+ 8 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js

@@ -42,5 +42,12 @@ 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` // 销售订单关联产品

+ 3 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/moduleList/moduleList.vue

@@ -203,6 +203,9 @@ function topMounted(row) {
 }
 
 function toDetail(item) {
+  if(queryParameters.value.key == 'tasks') {
+    return
+  }
   router.navigateTo({
     pathName: 'details',
     success: () => {

+ 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


+ 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;" },
+]