Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

yusm 2 miesięcy temu
rodzic
commit
12c95c4ef4
56 zmienionych plików z 479 dodań i 310 usunięć
  1. 1 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/login.vue
  2. 4 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/addEditor.vue
  3. 13 11
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/businessInfo.vue
  4. 10 6
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/detail.vue
  5. 7 6
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/relatedBusinessOpportunities.vue
  6. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/detail.vue
  7. 4 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contract/addEditor.vue
  8. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/detail.vue
  9. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/orderInfo.vue
  10. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/detail.vue
  11. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/addEditor.vue
  12. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/detail.vue
  13. 3 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/threadInfo.vue
  14. 3 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/businessEcharts.vue
  15. 8 7
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/dataSummary.vue
  16. 4 3
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/salesBriefings.vue
  17. 3 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/utility/defaultData.js
  18. 3 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/utility/generalVariables.js
  19. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/api.ts
  20. 11 10
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/analysis/index.vue
  21. 6 3
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/api.ts
  22. 5 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/deteleTables.vue
  23. 7 5
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/information.vue
  24. 3 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/detail/index.vue
  25. 16 13
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue
  26. 8 6
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/relatedBusiness.vue
  27. 5 3
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contract/component/addEditorTwo.vue
  28. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/information.vue
  29. 8 6
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/relatedBusiness.vue
  30. 1 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/login.vue
  31. 3 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts
  32. 3 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/information.vue
  33. 5 3
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue
  34. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/component/relatedBusiness.vue
  35. 4 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue
  36. 5 3
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/detail/components/information.vue
  37. 1 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/type.d.ts
  38. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/tools.ts
  39. 1 1
      fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/BusinessItemProductMapper.xml
  40. 2 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/LeaveSheetController.java
  41. 27 10
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  42. 72 12
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskFilesController.java
  43. 13 6
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LeaveSheet.java
  44. 0 59
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LeaveSheetFiles.java
  45. 24 6
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TaskExecutor.java
  46. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java
  47. 0 7
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/LeaveSheetFilesMapper.java
  48. 4 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/TaskExecutorMapper.java
  49. 1 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/LeaveSheetService.java
  50. 1 82
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/LeaveSheetServiceImpl.java
  51. 94 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskFilesServiceImpl.java
  52. 11 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TaskExecutorMapper.xml
  53. 2 2
      fhKeeper/formulahousekeeper/ops-platform/src/main/resources/application-prod.yml
  54. 29 2
      fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue
  55. 2 2
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue
  56. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

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

@@ -149,6 +149,7 @@ function bindIfNessary() {
 // 登陆前的处理
 function loginProcessing(data = {}) {
   sessionStorage.setItem('token', data.id)
+  sessionStorage.setItem('isExistBusiness', data.company.isExistBusiness || 0)
   userInfo.updateState({
     userInfo: data,
     token: data.id,

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

@@ -1,7 +1,7 @@
 <template>
   <div class="w-full h-full flex flex-col">
     <div class="flex-1 overflow-y-auto">
-      <FoldingPanel :title="Object.keys(formVal).length > 0 ? '修改商机' : '新建商机'">
+      <FoldingPanel :title="Object.keys(formVal).length > 0 ? `修改${businessLabel}` : `新建${businessLabel}`">
         <template #foldContainer>
           <CustomerForm ref="formFormRef" :formJson="formJson" :formValue="formVal"></CustomerForm>
         </template>
@@ -50,6 +50,8 @@ const props = defineProps({
   formValue: { required: true },
 });
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const { toastText, toastSuccess, toastFail, toastLoading } = useToast()
 const formFormRef = ref(null)
 const formVal = ref({})
@@ -108,7 +110,7 @@ function judgmentaAmounteEqual(mob, arr) {
   console.log(amounte, totalAmounte)
 
   if (amounte != totalAmounte) {
-    toastText(`商机金额${amounte > totalAmounte ? '大于' : '小于'}产品总金额,${amounte > totalAmounte ? '保存中...' : '请修改'}`)
+    toastText(`${businessLabel}金额${amounte > totalAmounte ? '大于' : '小于'}产品总金额,${amounte > totalAmounte ? '保存中...' : '请修改'}`)
     flag = true;
   }
 

+ 13 - 11
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/businessInfo.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="flex flex-col h-full">
     <div class="bg-white info flex-1 overflow-y-auto cellnormall">
-      <van-cell title="商机名称" :value="infoData.name" />
+      <van-cell :title="`${businessLabel}名称`" :value="infoData.name" />
       <van-cell title="客户名称" :value="infoData.customerName" />
       <van-cell title="联系人姓名" :value="infoData.contactsName" />
-      <van-cell title="商机金额">
+      <van-cell :title="`${businessLabel}金额`">
         <template #default>
           <span class="text-[#FF8B32]" v-if="infoData.amountOfMoney">¥ {{ infoData.amountOfMoney }}</span>
         </template>
       </van-cell>
       <van-cell title="预计成交" :value="infoData.expectedTransactionDate" />
-      <van-cell title="商机阶段" :value="infoData.stageValue" />
+      <van-cell :title="`${businessLabel}阶段`" :value="infoData.stageValue" />
       <van-cell title="负责人">
         <template #default>
           <TranslationComponent :openId="infoData.inchargerName" />
@@ -22,22 +22,22 @@
       <van-button type="primary" class="w-full block" v-if="!infoData.contactsName"
         @click="shoContactDialag()">关联联系人</van-button>
       <van-button type="warning" class="w-full block" v-if="infoData.inchargerName"
-        @click="showDialogCli()">转移商机</van-button>
+        @click="showDialogCli()">转移{{ businessLabel }}</van-button>
       <van-button type="primary" class="w-full block" v-if="!infoData.inchargerName"
-        @click="claimAndClaim()">认领商机</van-button>
-      <van-button type="default" class="w-full block" v-permission="[routingInformation.jurisdiction.edit]" @click="jumpEdit()">编辑商机</van-button>
-      <van-button type="danger" class="w-full block" v-permission="[routingInformation.jurisdiction.delete]" @click="deleteBusinessOpportunity()">删除商机</van-button>
+        @click="claimAndClaim()">认领{{ businessLabel }}</van-button>
+      <van-button type="default" class="w-full block" v-permission="[routingInformation.jurisdiction.edit]" @click="jumpEdit()">编辑{{ businessLabel }}</van-button>
+      <van-button type="danger" class="w-full block" v-permission="[routingInformation.jurisdiction.delete]" @click="deleteBusinessOpportunity()">删除{{ businessLabel }}</van-button>
     </div>
 
     <!-- 转移弹窗 -->
-    <van-dialog v-model:show="showDialog" :title="`转移商机`" show-cancel-button @confirm="confirmTransfer"
+    <van-dialog v-model:show="showDialog" :title="`转移${businessLabel}`" show-cancel-button @confirm="confirmTransfer"
       :before-close="dialogCloseBefo">
       <van-cell title="转移至" is-link @click="showSelect = true">
         <template #value>
           <TranslationComponent :openId="dialogSelection.label" />
         </template>
       </van-cell>
-      <div class="themeTextColor text-size-small pl-4 pt-2 pb-2">转移后,将看不到此商机了</div>
+      <div class="themeTextColor text-size-small pl-4 pt-2 pb-2">转移后,将看不到此{{ businessLabel }}了</div>
     </van-dialog>
 
     <van-dialog v-model:show="showContactDialog" :title="`关联联系人`" show-cancel-button @confirm="relatedContacts"
@@ -86,6 +86,8 @@ const props = defineProps({
 })
 const infoData = ref(props.info)
 const routingInformation = routingInfos['business']
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 
 watch(() => props.info, (newValue) => {
   infoData.value = newValue
@@ -176,8 +178,8 @@ function confirmTransfer() {
 
 function claimAndClaim() {
   showConfirmDialog({
-    title: '认领商机',
-    message: `确定认领【${props.info.name}】商机吗?`,
+    title: `认领${businessLabel}`,
+    message: `确定认领【${props.info.name}】${businessLabel}吗?`,
   }).then(() => {
     requests.post(BUSINESS_OPPORTUNITY_TRANSFER, { ids: props.info.id, inchargerId: userInfo.userInfo.id }).then((res) => {
       toastSuccess('认领成功')

+ 10 - 6
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/detail.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="w-full h-full">
     <van-tabs v-model:active="tabActive">
-      <van-tab title="商机阶段" name="商机阶段">
+      <van-tab :title="`${businessLabel}阶段`" :name="`${businessLabel}阶段`">
         <BusinessOpportunityStage :info="infoData" @chnage="refreshData()" />
       </van-tab>
-      <van-tab title="商机信息" name="商机信息">
+      <van-tab :title="`${businessLabel}信息`" :name="`${businessLabel}信息`">
         <BusinessInfo :info="infoData" />
       </van-tab>
       <van-tab title="相关产品" name="相关产品">
@@ -36,14 +36,18 @@ const props = defineProps({
     default: () => ({})
   }
 })
-const tabActive = ref('商机信息');
+
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+const tabActive = ref(`${businessLabel}信息`);
 const relatedProductsList = ref([]);
 const relatedTasksList = ref([]);
 const infoData = ref(props.info);
 const timeout = ref(null);
 
+
 watch(() => props.info, (newValue) => {
-  tabActive.value = '商机信息';
+  tabActive.value = `${businessLabel}信息`;
   processingData(newValue.id)
 })
 
@@ -73,11 +77,11 @@ function processingData(id) {
 
 useLifecycle({
   init: () => {
-    tabActive.value = '商机信息';
+    tabActive.value = `${businessLabel}信息`;
     processingData(props.info.id)
   },
   load: () => {
-    tabActive.value = '商机信息';
+    tabActive.value = `${businessLabel}信息`;
     processingData(props.info.id)
   },
   unLoad: () => {

+ 7 - 6
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/relatedBusinessOpportunities.vue

@@ -2,23 +2,23 @@
   <div class="flex flex-col h-full overflow-y-auto">
     <div class="info h-full cellnormall" v-if="infoListData.length">
       <div v-for="(item, index) in infoListData">
-        <FoldingPanel :title="`相关商机(${item.name})`">
+        <FoldingPanel :title="`相关${businessLabel}(${item.name})`">
           <template #foldContainer>
             <div class="p-5 bg-white ">
-              <van-cell title="商机名称" :value="item.name" />
+              <van-cell :title="`${businessLabel}名称`" :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">
+              <van-cell :title="`${businessLabel}金额`" :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="`${businessLabel}阶段`" :value="item.stageValue" />
               <van-cell title="预计成交时间" :value="item.creatorName" />
             </div>
           </template>
@@ -26,7 +26,7 @@
       </div>
     </div>
     <div v-else class="items-justify-center h-2/3">
-      <van-empty description="暂无商机" />
+      <van-empty :description="`暂无${businessLabel}`" />
     </div>
   </div>
 </template>
@@ -44,7 +44,8 @@ const props = defineProps({
     default: () => ([])
   }
 })
-
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const infoListData = ref(props.infoList);
 
 watch(() => props.infoList, (newValue) => {

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/detail.vue

@@ -7,7 +7,7 @@
       <van-tab title="相关任务" name="相关任务">
         <RelatedTasks :infoList="relatedTasksList" />
       </van-tab>
-      <van-tab title="相关商机" name="相关商机">
+      <van-tab :title="`相关${businessLabel}`" :name="`相关${businessLabel}`">
         <RelatedBusinessOpportunities :infoList="relatedBusinessOpportunitiesList"  />
       </van-tab>
     </van-tabs>
@@ -38,6 +38,9 @@ const relatedTasksList = ref([]);
 const infoData = ref(props.info);
 const timeout = ref(null);
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 watch(() => props.info, (newValue) => {
   tabActive.value = '联系人信息';
   processingData(newValue.id)

+ 4 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contract/addEditor.vue

@@ -31,7 +31,7 @@
                     readonly />
                 </template>
               </van-cell>
-              <van-cell title="回款金额">
+              <van-cell title="金额(含税)">
                 <template #default>
                   <van-field v-model="item.amount" type="digit" input-align="right" placeholder="请输入金额"
                     class="resetStyles" />
@@ -199,7 +199,9 @@ function inputNumberChange(index) {
     return
   }
 
-  paymentPlanList.value[index].taxAmount = +((amount * taxRate / 100).toFixed(2))
+  const shui = taxRate / 100
+  const zhi = amount / (1 + shui) * shui
+  paymentPlanList.value[index].taxAmount = +(zhi.toFixed(2))
 }
 
 function onConfirm(val) {

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/detail.vue

@@ -10,7 +10,7 @@
       <van-tab title="相关联系人" name="相关联系人">
         <RelatedContacts :infoList="relatedContactsList" />
       </van-tab>
-      <van-tab title="相关商机" name="相关商机">
+      <van-tab :title="`相关${businessLabel}`" :name="`相关${businessLabel}`">
         <RelatedBusinessOpportunities :infoList="relatedBusinessOpportunitiesList" />
       </van-tab>
       <van-tab title="相关销售订单" name="相关销售订单">
@@ -48,6 +48,9 @@ const relatedSalesOrdersList = ref([]);
 const infoData = ref(props.info)
 const timeout = ref(null);
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目";
+
 watch(() => props.info, (newValue) => {
   tabActive.value = '客户信息';
   processingData(newValue.id)

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

@@ -4,7 +4,7 @@
       <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="`${businessLabel}名称`" :value="info.businessOpportunityName" />
       <van-cell title="订单金额" :value="info.price">
         <template #default>
           <span class="text-[#FF8B32]" v-if="info.price">¥ {{ info.price }}</span>
@@ -103,6 +103,9 @@ const showDialog = ref(false);
 const showSelect = ref(false);
 const dialogSelection = ref({});
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 function deleteRow() {
   const { name = '', searchFiled = {}, deteleFiled = '' } = routingInformation
   const row = props.info

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/product/detail.vue

@@ -4,7 +4,7 @@
       <van-tab title="产品信息" name="产品信息">
         <ProductInfo :info="infoData" />
       </van-tab>
-      <van-tab title="相关商机" name="相关商机">
+      <van-tab :title="`相关${businessLabel}`" :name="`相关${businessLabel}`">
         <RelatedBusinessOpportunities :infoList="relatedBusinessOpportunitiesList"  />
       </van-tab>
       <van-tab title="相关销售订单" name="相关销售订单">
@@ -38,6 +38,9 @@ const relatedSalesOrdersList = ref([]);
 const infoData = ref(props.info);
 const timeout = ref(null);
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 watch(() => props.info, (newValue) => {
   tabActive.value = '产品信息';
   processingData(newValue.id)

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

@@ -28,7 +28,7 @@
         </template>
         <!-- 商机选择 -->
         <template v-if="vantFormVal.taskType == 1">
-          <van-field v-model="vantFormVal.businessOpportunityId" name="businessOpportunityId" label="商机"
+          <van-field v-model="vantFormVal.businessOpportunityId" name="businessOpportunityId" :label="`${businessLabel}`"
             placeholder="请选择" is-link readonly class="resetStyles"
             @click="showSelectionBox('businessOpportunityId', allBusinessOpportunities)">
             <template #input v-if="vantFormVal.businessOpportunityId">
@@ -229,6 +229,9 @@ const showSelectionToFlag = ref(false)
 const showSelectionToValue = ref([])
 const taskTypeFiled = ['customId', 'businessOpportunityId', 'orderId', 'clueId']
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 const contactDisabled = computed(() => {
   const taskType = vantFormVal.value?.taskType
   if (!taskType && taskType != 0) {

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/detail.vue

@@ -22,7 +22,7 @@
       <van-cell title="开始时间" :value="infoData.startDate" />
       <van-cell title="截至时间" :value="infoData.endDate" />
       <van-cell title="客户名称" :value="infoData.customName" v-if="infoData.customName" />
-      <van-cell title="商机名称" :value="infoData.businessName" v-if="infoData.businessName" />
+      <van-cell :title="`${businessLabel}名称`" :value="infoData.businessName" v-if="infoData.businessName" />
       <van-cell title="销售订单" :value="infoData.orderName" v-if="infoData.orderName" />
       <van-cell title="线索名称" :value="infoData.clueName" v-if="infoData.clueName" />
       <van-cell title="联系人名称" :value="infoData.contactsName" v-if="!infoData.clueId" />
@@ -107,6 +107,9 @@ const showEndtDelayData = ref('');
 const showDateType = ref('');
 const timeJudgment = ref(new Date())
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 watch(() => props.info, (newValue) => {
   initializeData(newValue.id)
 })

+ 3 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/threadInfo.vue

@@ -16,7 +16,7 @@
       <van-cell title="备注" :value="info.remark" />
     </div>
     <div class="bottomButton">
-      <van-button type="primary" class="w-full block" v-if="info.inchargerName && info.isBo != 1"  @click="transformBusinessOpportunities()">线索转商机</van-button>
+      <van-button type="primary" class="w-full block" v-if="info.inchargerName && info.isBo != 1"  @click="transformBusinessOpportunities()">线索转{{ businessLabel }}</van-button>
       <van-button type="warning" class="w-full block" v-if="info.inchargerName"  @click="showDialogCli()">转移线索</van-button>
       <van-button type="primary" class="w-full block" v-if="!info.inchargerName" @click="claimAndClaim()">认领线索</van-button>
       <van-button type="default" class="w-full block" v-permission="[routingInformation.jurisdiction.edit]" @click="jumpEdit()">编辑线索</van-button>
@@ -71,6 +71,8 @@ const routingInformation = routingInfos['thread']
 const showDialog = ref(false);
 const showSelect = ref(false);
 const dialogSelection = ref({});
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 
 function transformBusinessOpportunities() {
   const InfoJson = routingInfos['business']

+ 3 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/businessEcharts.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="businessOpportunityStage box mt-4">
     <div class="box-title">
-      <div class="box-title-left text-size-in">商机阶段</div>
+      <div class="box-title-left text-size-in">{{ businessLabel }}阶段</div>
       <div class="box-title-right text-size-small" @click="showPopUpLayer()">
         {{ scopeText }}/{{ dateText }}
         <van-icon name="play" class="ml-2 rotate-90" color="#747474" />
@@ -46,7 +46,8 @@ const echartsOption = ref({})
 const scopeText = computed(() => {
   return fixedFieldPermissionOptions[filterCriteria.value.scopeSelection].label
 })
-
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const dateText = computed(() => {
   if(filterCriteria.value.dateSelection == -1) {
     const { customTime = [] } = filterCriteria.value

+ 8 - 7
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/dataSummary.vue

@@ -32,27 +32,27 @@
       <div class="data-item flex flex-row bg-[#F8F8FA]">
         <img src="/src/assets/image/shangjihz.png" class="businessOpportunity-img">
         <div class="flex-1">
-          <div class="font-bold text-[#000]">商机汇总</div>
+          <div class="font-bold text-[#000]">{{ businessLabel }}汇总</div>
           <div class="flex mt-2">
             <div class="text-size-small text-[#999]" style="width: 40%;">
-              新增商机 <span class="ml-1 text-[#51C2FF]">
+              新增{{ businessLabel }} <span class="ml-1 text-[#51C2FF]">
                 {{ dataSummary?.businessOpportunityDataSummary?.newNum || 0 }}
               </span> 个
             </div>
             <div class="text-size-small text-[#999]" style="width: 60%;">
-              商机赢单 <span class="ml-1 text-[#51C2FF]">
+              {{ businessLabel }}赢单 <span class="ml-1 text-[#51C2FF]">
                 {{ dataSummary?.businessOpportunityDataSummary?.winning || 0 }}
               </span> 个
             </div>
           </div>
           <div class="flex mt-2">
             <div class="text-size-small text-[#999]" style="width: 40%;">
-              输单商机 <span class="ml-1 text-[#51C2FF]">
+              输单{{ businessLabel }} <span class="ml-1 text-[#51C2FF]">
                 {{ dataSummary?.businessOpportunityDataSummary?.losting || 0 }}
               </span> 个
             </div>
             <div class="text-size-small text-[#999]" style="width: 60%;">
-              商机总金额 <span class="ml-1 text-[#51C2FF]">
+              {{ businessLabel }}总金额 <span class="ml-1 text-[#51C2FF]">
                 {{ dataSummary?.businessOpportunityDataSummary?.allAmountOfMoney || 0 }}
               </span> 元
             </div>
@@ -71,7 +71,7 @@
               </span> 个
             </div>
             <div class="w-1/2 text-size-small text-[#999]">
-              线索转商机 <span class="ml-1 text-[#28C67E]">
+              线索转{{ businessLabel }} <span class="ml-1 text-[#28C67E]">
                 {{ dataSummary?.clueDataSummary?.changeNum || 0 }}
               </span> 个
             </div>
@@ -112,7 +112,8 @@ const filterCriteria = ref({
 const scopeText = computed(() => {
   return fixedFieldPermissionOptions[filterCriteria.value.scopeSelection].label
 })
-
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const dateText = computed(() => {
   if(filterCriteria.value.dateSelection == -1) {
     const { customTime = [] } = filterCriteria.value

+ 4 - 3
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/salesBriefings.vue

@@ -39,7 +39,7 @@
         <div class="item">
           <img src="/src/assets/image/salesKitlishi.png" class="item-img" />
           <div class="flex flex-col justify-center text=[#999999]">
-            <div>新增商机</div>
+            <div>新增{{ businessLabel }}</div>
             <div class="flex items-end">
               <span class="text-[#F3893C] text-size-in font-bold mr-1">
                 {{ salesBriefings?.businessOpportunity?.businessOpportunityCount || 0 }}
@@ -75,7 +75,7 @@
         <div class="item">
           <img src="/src/assets/image/salesKitshangji.png" class="item-img" />
           <div class="flex flex-col justify-center text=[#999999]">
-            <div>商机金额</div>
+            <div>{{ businessLabel }}金额</div>
             <div class="flex items-end">
               <span class="text-[#EED116] text-size-in font-bold mr-1">
                 {{ salesBriefings?.businessOpportunityPrice?.businessOpportunityPrice || 0 }}
@@ -127,7 +127,8 @@ const filterCriteria = ref({
   dateSelection: 0,
   customTime: []
 })
-
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const scopeText = computed(() => {
   return fixedFieldPermissionOptions[filterCriteria.value.scopeSelection].label
 })

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

@@ -20,10 +20,12 @@ export const fixedFieldPriority = [
   { label: "低", value: 0 },
 ]
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 // 任务类型
 export const fixedFieldTaskType = [
   { label: "客户", value: 0, show: true },
-  { label: "商机", value: 1, show: true },
+  { label: businessLabel, value: 1, show: true },
   { label: "销售订单", value: 2, show: true },
   { label: "线索", value: 3, show: false },
 ]

Plik diff jest za duży
+ 3 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/utility/generalVariables.js


+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/api.ts

@@ -28,10 +28,13 @@ export const PRIORITY = [
   { label: "低", value: 0 },
 ];
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 export const TASK_TYPE = [
   // 弹窗任务类型
   { label: "客户", value: 0, show: true },
-  { label: "商机", value: 1, show: true },
+  { label: businessLabel, value: 1, show: true },
   { label: "销售订单", value: 2, show: true },
   { label: "线索", value: 3, show: false },
 ];

+ 11 - 10
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/analysis/index.vue

@@ -19,7 +19,8 @@ import {
 } from './api';
 
 const dataAnalysisFlag = userInfo?.moduleList?.filter((item: any) => item.path == '/analysis') || []
-
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const permissionOptions = dataAnalysisFlag.length > 0 ? [
   {
     label: '仅本人',
@@ -251,7 +252,7 @@ watchEffect(() => {
             :compare="requestData?.bulletin?.contacts.contactsPromote"
           />
           <TrendCard
-            title="新增商机"
+            :title="`新增${businessLabel}`"
             unit="个"
             :selectVal="bulletinPrompt"
             :number="requestData?.bulletin?.businessOpportunity.businessOpportunityCount"
@@ -272,7 +273,7 @@ watchEffect(() => {
             :compare="requestData?.bulletin?.salesOrdersPrice.salesOrderPricePromote"
           />
           <TrendCard
-            title="商机金额"
+            :title="`${businessLabel}金额`"
             unit="元"
             :selectVal="bulletinPrompt"
             :number="requestData?.bulletin?.businessOpportunityPrice.businessOpportunityPrice"
@@ -355,25 +356,25 @@ watchEffect(() => {
               v-if="false"
             />
           </div>
-          <Divider title="商机汇总" />
+          <Divider :title="`${businessLabel}汇总`" />
           <div class="my-6 grid grid-cols-4 gap-2">
             <SimpleCard
-              title="新增商机"
+              :title="`新增${businessLabel}`"
               unit="个"
               :number="requestData.summary?.businessOpportunityDataSummary.newNum"
             />
             <SimpleCard
-              title="赢单商机"
+              :title="`赢单${businessLabel}`"
               unit="个"
               :number="requestData.summary?.businessOpportunityDataSummary.winning"
             />
             <SimpleCard
-              title="输单商机"
+              :title="`输单${businessLabel}`"
               unit="个"
               :number="requestData.summary?.businessOpportunityDataSummary.losting"
             />
             <SimpleCard
-              title="商机总金额"
+              :title="`${businessLabel}总金额`"
               unit="元"
               :number="requestData.summary?.businessOpportunityDataSummary.allAmountOfMoney"
             />
@@ -386,14 +387,14 @@ watchEffect(() => {
               :number="requestData.summary?.clueDataSummary.newNum"
             />
             <SimpleCard
-              title="线索转商机"
+              :title="`线索转${businessLabel}`"
               unit="个"
               :number="requestData.summary?.clueDataSummary.changeNum"
             />
           </div>
         </div>
         <div class="border-gray-200 border rounded p-3 flex-1">
-          <div class="text-sm font-medium">商机阶段</div>
+          <div class="text-sm font-medium">{{ `${businessLabel}阶段` }}</div>
           <div class="flex gap-3 mb-8 mt-2">
             <div class="w-40">
               <el-select

+ 6 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/api.ts

@@ -40,13 +40,16 @@ export const stageStatus = [
     { id: 3, name: "无效", progress: "0%" }
 ]
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 export const tableColumn: businessTableColumnInterface[] = [
-    { prop: "name", label: "商机名称", width: "180", eventName: "toClueTableDetail" },
+    { prop: "name", label: `${businessLabel}名称`, width: "180", eventName: "toClueTableDetail" },
     { prop: "customerName", label: "客户名称", width: "180" },
     { prop: "contactsName", label: "联系人", width: "180", eventName: "showName" },
-    { prop: "amountOfMoney", label: "商机金额", width: "180" },
+    { prop: "amountOfMoney", label: `${businessLabel}金额`, width: "180" },
     { prop: "expectedTransactionDate", label: "预计成交时间", width: "180" },
-    { prop: "stageValue", label: "商机阶段", width: "180" },
+    { prop: "stageValue", label: `${businessLabel}阶段`, width: "180" },
     { prop: "inchargerName", label: "负责人", width: "180" },
     { prop: "creatorName", label: "创建人", width: "180" },
     { prop: "createTime", label: "创建时间", width: "180" }

+ 5 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/deteleTables.vue

@@ -3,7 +3,7 @@
         top="10vh">
         <template #header="{ close, titleId, titleClass }">
             <div class="flex justify-between items-center border-b pb-3 dialog-header">
-                <h4 :id="titleId">商机回收站</h4>
+                <h4 :id="titleId">{{ businessLabel }}回收站</h4>
                 <div>
                     <el-button type="primary" v-loading="allLoading.batchRecoveryLoading" :disabled="batchTableData.length == 0"
                         @click="batchOperation('恢复')">批量恢复</el-button>
@@ -72,6 +72,9 @@ const tableForm = reactive({
     pageFrom: 10
 })
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 const busiessTableRef = ref<InstanceType<typeof ElTable>>() // 线索table dom
 
 const props = defineProps<{
@@ -92,7 +95,7 @@ function batchOperation(type: operationType) {
 }
 
 function businessOperationItem(value: string | number, label: string, type: operationType, batch: boolean = false) {
-    confirmAction(`确定${batch ? '批量' : ''}${type}【${label}】商机吗?`).then(() => {
+    confirmAction(`确定${batch ? '批量' : ''}${type}【${label}】${businessLabel}吗?`).then(() => {
         let url = type == '恢复' ? BUSIESS_ROWBACK : BUSIESS_PERDETELE
         post(url, { ids: value }).then(res => {
             if (res.code != 'ok') {

+ 7 - 5
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/information.vue

@@ -12,7 +12,7 @@
         </div>
         <div class="form flex flex-wrap justify-between">
             <div class="formItem flex pt-3 pb-1">
-                <div class="w-20 text-right text-gray-500">商机名称:</div>
+                <div class="w-20 text-right text-gray-500">{{ businessLabel }}名称:</div>
                 <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1" v-ellipsis-tooltip>{{ information.name }}</div>
             </div>
             <div class="formItem flex pt-3 pb-1">
@@ -27,7 +27,7 @@
                 </div>
             </div>
             <div class="formItem flex pt-3 pb-1">
-                <div class="w-22 text-right text-gray-500">商机金额:</div>
+                <div class="w-22 text-right text-gray-500">{{ businessLabel }}金额:</div>
                 <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1" v-ellipsis-tooltip>{{ information.amountOfMoney || 0
                 }} 元</div>
             </div>
@@ -82,7 +82,7 @@
         <el-dialog v-model="allVisible.transferBusinessVisible" width="600" :show-close="false" top="10vh">
             <template #header="{ close, titleId, titleClass }">
                 <div class="flex justify-between items-center border-b pb-3 dialog-header">
-                    <h4 :id="titleId">{{ '转移商机' }}</h4>
+                    <h4 :id="titleId">转移{{ businessLabel }}</h4>
                     <div>
                         <el-button type="primary" :loading="allLoading.transferBusinessLoading"
                             @click="transferBusiness()">转移</el-button>
@@ -98,7 +98,7 @@
                     </el-select> -->
                     <personnel-search v-model="transferValue" :size="''" placeholder="请选择"></personnel-search>
                 </div>
-                <div class="pl-3 text-[#e94a4a]">转移后,将看不到此商机</div>
+                <div class="pl-3 text-[#e94a4a]">转移后,将看不到此{{ businessLabel }}</div>
             </div>
         </el-dialog>
 
@@ -143,6 +143,8 @@ const props = defineProps<{
     information: any
 }>()
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const information = ref<any>({})
 const transferValue = ref('')
 const transferOptions = ref<personnelInterface[]>([])
@@ -212,7 +214,7 @@ function transferBusiness() {
 }
 
 function claimBusiness() {
-    confirmAction(`确定认领【${information.value.name}】商机吗?`).then(() => {
+    confirmAction(`确定认领【${information.value.name}】${businessLabel}吗?`).then(() => {
         transferBusiness()
     })
 }

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

@@ -3,7 +3,7 @@
     <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-icon class="el-icon--right"><icon-view /></el-icon> 返回{{ businessLabel }}列表
         </el-link>
       </div>
       <div class="mr-8">
@@ -123,6 +123,8 @@ type stageListType = {
   id?: number,
 }
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const route = useRoute()
 const globalPopup = inject<GlobalPopup>('globalPopup')
 const detailCompinentsData = ref([])

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

@@ -4,10 +4,10 @@
       <div class="bg-white w-full h-full shadow-md rounded-md flex flex-col">
         <div class="flex-1 p-3 overflow-y-auto">
           <el-form :model="businessOpportunityForm" label-width="70px" style="max-width: 600px">
-            <el-form-item label="商机名称">
+            <el-form-item :label="`${businessLabel}名称`">
               <el-input v-model="businessOpportunityForm.name" clearable placeholder="请输入"></el-input>
             </el-form-item>
-            <el-form-item label="商机阶段">
+            <el-form-item :label="`${businessLabel}阶段`">
               <el-select v-model="businessOpportunityForm.stageId" placeholder="请选择" clearable>
                 <el-option v-for="item in fixedData.BusinessStage" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
@@ -58,7 +58,7 @@
           </div>
           <div class="justify-end flex">
             <el-button v-permission="['businessAddAnEdit']" type="primary"
-              @click="editNewBusiness(false)">新建商机</el-button>
+              @click="editNewBusiness(false)">新建{{ businessLabel }}</el-button>
             <el-button type="primary" @click="showVisible('batchTransferVisible')"
               :disabled="batchTableData.length <= 0">批量转移</el-button>
             <el-button type="primary" v-permission="['businessDelete']" @click="batchDeteleItem()"
@@ -163,7 +163,7 @@
           </el-select> -->
           <personnel-search v-model="transferPersonnel" :size="''" placeholder="请选择"></personnel-search>
         </div>
-        <div class="pl-3 text-[#e94a4a]">转移后,将看不到此商机</div>
+        <div class="pl-3 text-[#e94a4a]">转移后,将看不到此{{ businessLabel }}</div>
       </div>
     </el-dialog>
 
@@ -184,8 +184,8 @@
       <div class="p-8">
         <div class="ml-4 mr-4">
           <div class="flex items-center">1、点击下载 <el-link type="primary"
-              @click="downloadTemplate(MODURL, '商机导入模板.xlsx')">商机导入模板.xlsx</el-link></div>
-          <div class="mt-4">2、填写excel文件、商机名称、商机金额、商机阶段必填</div>
+              @click="downloadTemplate(MODURL, `${businessLabel}导入模板.xlsx`)">{{businessLabel}}导入模板.xlsx</el-link></div>
+          <div class="mt-4">2、填写excel文件、{{businessLabel}}名称、{{businessLabel}}金额、{{businessLabel}}阶段必填</div>
         </div>
       </div>
     </el-dialog>
@@ -222,6 +222,9 @@ import { GETTABLELISTPRODUCT } from "../order/api";
 import personnelSearch from '@/components/translationComponent/personnelSearch/personnelSearch.vue';
 import kanbanView from "./component/kanbanView.vue";
 
+
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const router = useRouter()
 const globalPopup = inject<GlobalPopup>('globalPopup')
 const businessTableRef = ref<InstanceType<typeof ElTable>>() // 商机table dom
@@ -254,8 +257,8 @@ const allVisible = reactive({
   importVisible: false
 })
 const allText = reactive({
-  newBusinessisibleText: '新建商机',
-  transferText: '转移商机'
+  newBusinessisibleText: `新建${businessLabel}`,
+  transferText: `转移${businessLabel}`
 }) // 所有文本
 
 const taskModalForm = ref({}) // 任务弹窗表单
@@ -326,14 +329,14 @@ function editNewBusiness(item: any) {
       allLoading.generateFormLading = true
       editProduct(item)
       businessTemplateValue.value = editBusinessData(item)
-      allText.newBusinessisibleText = '编辑商机'
+      allText.newBusinessisibleText = `编辑${businessLabel}`
     }
     if (!item) {
       businessTemplateRef.value && businessTemplateRef.value.reset()
       businessTemplate.value = businessTemplate.value
       businessTemplateValue.value = {}
       productTableListValue.value = []
-      allText.newBusinessisibleText = '新建商机'
+      allText.newBusinessisibleText = `新建${businessLabel}`
     }
   }, 0)
   setTimeout(() => {
@@ -382,7 +385,7 @@ function batchDeteleItem() {
 }
 
 function businessDeteleItem(value: string | number, label: string, batch: boolean = false) {
-  confirmAction(`确定${batch ? '批量' : ''}删除【${label}】商机吗?`).then(() => {
+  confirmAction(`确定${batch ? '批量' : ''}删除【${label}】${businessLabel}吗?`).then(() => {
     post(BUSINESSDETELE, { ids: value }).then(res => {
       if (res.code != 'ok') {
         globalPopup?.showError(res.msg)
@@ -405,7 +408,7 @@ async function importBusiness(param: UploadRequestOptions) {
     allLoading.importLoading = false
   })
   if (res.code == 'ok') {
-    globalPopup?.showSuccess('导入成功' || '')
+    globalPopup?.showSuccess('导入成功')
     searchForBusinessOpportunities()
     return
   }
@@ -416,7 +419,7 @@ function exportBusinessTableList() {
   allLoading.exoprtLoading = true
   let valueForm = getFromValue(businessOpportunityForm)
   post(URL_EXPORTBUSINESS, { ...valueForm }).then((res) => {
-    downloadFile(res.data, '商机表导出.xlsx')
+    downloadFile(res.data, `${businessLabel}表导出.xlsx`)
   }).finally(() => {
     allLoading.exoprtLoading = false
   })

+ 8 - 6
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/relatedBusiness.vue

@@ -1,14 +1,14 @@
 <template>
     <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
         <div class="flex justify-between">
-            <div class="title">相关商机</div>
+            <div class="title">相关{{ businessLabel }}</div>
             <div v-permission="['businessAddAnEdit']">
-                <el-button type="primary" @click="addBusiness()">新建商机</el-button>
+                <el-button type="primary" @click="addBusiness()">新建{{ businessLabel }}</el-button>
             </div>
         </div>
         <div class="flex-1 overflow-auto pt-3">
             <el-table :data="relatedTaskstable" border height="300" style="width: 100%;">
-                <el-table-column prop="name" label="商机名称">
+                <el-table-column prop="name" :label="`${businessLabel}名称`">
                     <template #default="scope">
                         <el-button link type="primary" size="large" @click="toBusDetal(scope.row)">{{
                             scope.row.name
@@ -21,9 +21,9 @@
                         <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName"></TextTranslation>
                     </template>
                 </el-table-column>
-                <el-table-column prop="amountOfMoney" label="商机金额" width="130" />
+                <el-table-column prop="amountOfMoney" :label="`${businessLabel}金额`" width="130" />
                 <el-table-column prop="expectedTransactionDate" label="预计成交时间" width="170" />
-                <el-table-column prop="stageValue" label="商机阶段" width="130" />
+                <el-table-column prop="stageValue" :label="`${businessLabel}阶段`" width="130" />
                 <el-table-column prop="creatorName" label="创建人" width="130">
                     <template #default="scope">
                         <TextTranslation translationTypes="userName" :translationValue="scope.row.creatorName"></TextTranslation>
@@ -38,7 +38,7 @@
         <el-dialog v-model="allVisible.newBusinessisible" width="1000" :show-close="false" top="10vh">
             <template #header="{ close, titleId, titleClass }">
                 <div class="flex justify-between items-center border-b pb-3 dialog-header">
-                    <h4 :id="titleId">新建商机</h4>
+                    <h4 :id="titleId">新建{{ businessLabel }}</h4>
                     <div>
                         <el-button type="primary" @click="editBusiness()"
                             :loading="allLoading.businessSaveLading">保存</el-button>
@@ -74,6 +74,8 @@ const props = defineProps<{
     data: any
 }>()
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const information = ref<any>({})
 const relatedTaskstable = ref([])
 const businessTemplateRef = ref<typeof GenerateForm>() // 自定义表单dom

+ 5 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contract/component/addEditorTwo.vue

@@ -41,7 +41,9 @@ function calculateTaxAmount(index: number) {
     return
   }
 
-  paymentPlan.value[index].taxAmount = +((amount * taxRate / 100).toFixed(2))
+  const shui = taxRate / 100
+  const zhi = amount / (1 + shui) * shui
+  paymentPlan.value[index].taxAmount = +(zhi.toFixed(2))
 }
 
 // 上传附件
@@ -99,9 +101,9 @@ defineExpose({
             placeholder="回款日期" style="width: 150px;" />
         </template>
       </el-table-column>
-      <el-table-column label="回款金额" width="180">
+      <el-table-column label="金额(含税)" width="180">
         <template #default="scope">
-          <el-input v-model="scope.row.amount" v-enter-number placeholder="回款金额" style="width: 150px;">
+          <el-input v-model="scope.row.amount" v-enter-number placeholder="金额(含税)" style="width: 150px;">
             <template #prefix>
               <el-text class="mx-1" type="info">¥</el-text>
             </template>

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/information.vue

@@ -164,6 +164,9 @@ const generateFormData = ref({
   config: {},
   list: []
 }); // 自定义表单数据
+
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const generateFormValue = ref({});
 const generateForm = ref<typeof GenerateForm>();
 const generateFormKey = ref(1);
@@ -234,7 +237,7 @@ function transferCustomer() {
 }
 
 function claimCustomer() {
-  confirmAction(`确定认领【${information.value.customName}】商机吗?`).then(() => {
+  confirmAction(`确定认领【${information.value.customName}】${businessLabel}吗?`).then(() => {
     transferCustomer();
   });
 }

+ 8 - 6
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/relatedBusiness.vue

@@ -1,14 +1,14 @@
 <template>
     <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
         <div class="flex justify-between">
-            <div class="title">相关商机</div>
+            <div class="title">相关{{ businessLabel }}</div>
             <div v-permission="['businessAddAnEdit']">
-                <el-button type="primary" @click="editNewBusiness()">新建商机</el-button>
+                <el-button type="primary" @click="editNewBusiness()">新建{{ businessLabel }}</el-button>
             </div>
         </div>
         <div class="flex-1 overflow-auto pt-3">
             <el-table :data="relatedTaskstable" border style="width: 100%;height: 300px;">
-                <el-table-column prop="taskName" label="商机名称">
+                <el-table-column prop="taskName" :label="`${businessLabel}名称`">
                     <template #default="scope">
                         <el-button link type="primary" size="large" @click="toDetail(scope.row)">{{
                             scope.row.name
@@ -21,9 +21,9 @@
                         <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName"></TextTranslation>
                     </template>
                 </el-table-column>
-                <el-table-column prop="amountOfMoney" label="商机金额" width="130" />
+                <el-table-column prop="amountOfMoney" :label="`${businessLabel}金额`" width="130" />
                 <el-table-column prop="expectedTransactionDate" label="预计成交时间" width="200" />
-                <el-table-column prop="stageValue" label="商机阶段" width="140" />
+                <el-table-column prop="stageValue" :label="`${businessLabel}阶段`" width="140" />
                 <el-table-column prop="creatorName" label="创建人" width="130">
                     <template #default="scope">
                         <TextTranslation translationTypes="userName" :translationValue="scope.row.creatorName"></TextTranslation>
@@ -36,7 +36,7 @@
         <el-dialog v-model="allVisible.newBusinessisible" width="1000" :show-close="false" top="10vh">
             <template #header="{ close, titleId, titleClass }">
                 <div class="flex justify-between items-center border-b pb-3 dialog-header">
-                    <h4 :id="titleId">{{ '新建商机' }}</h4>
+                    <h4 :id="titleId">新建{{ businessLabel }}</h4>
                     <div>
                         <el-button type="primary" @click="editBusiness(false)" :loading="allLoading.businessSaveLading"
                             :disabled="allLoading.newBusinessSaveLading">保存</el-button>
@@ -71,6 +71,8 @@ const props = defineProps<{
     data: any
 }>()
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const information = ref<any>({})
 const relatedTaskstable = ref([])
 const relatedProductsRef = ref<typeof RelatedProducts>()

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

@@ -135,6 +135,7 @@ const loginLogic = (data: any) => {
     alert('无权访问,请联系管理员为您分配权限')
     return
   }
+  sessionStorage.setItem('isExistBusiness', data.company.isExistBusiness || 0)
   sessionStorage.setItem('token', data.id)
   localStorage.setItem('SUPERSONIC_TOKEN', data.supersonicToken)
   setValue(data, 'userInfo')

+ 3 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts

@@ -22,11 +22,13 @@ export const URL_ADDREBATE = `${MOD}/paymentCollection`
 export const URL_EDITEBATE = `${MOD}/editPayment`
 export const URL_DETELEITEMS = `${MOD}/deletePayment`
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 export const tableColumns: TableColumn[] = [
     { prop: 'orderCode', label: '订单编号', width: '150' },
     { prop: 'orderName', label: '订单名称', event: 'toDetali', width: '150' },
     { prop: 'customName', label: '客户名称', width: '200' },
-    { prop: 'businessOpportunityName', label: '商机名称', width: '200' },
+    { prop: 'businessOpportunityName', label: `${businessLabel}名称`, width: '200' },
     { prop: 'price', label: '订单金额(¥)', width: '140' },
     { prop: 'receivedPayment', label: '已回款(¥)', width: '140' },
     { prop: 'unReceivedPayment', label: '未回款(¥)', width: '140' },

+ 3 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/information.vue

@@ -95,6 +95,8 @@ const orderTemplate = ref({
     list: [],
     config: {}
 })
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const orderTemplateValue = ref({})
 const orderTemplateKey = ref(1)
 const orderTemplateRef = ref<typeof GenerateForm>()
@@ -196,7 +198,7 @@ const formItems = reactive([
     { label: '订单编号', key: 'orderCode', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
     { label: '订单名称', key: 'orderName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
     { label: '客户名称', key: 'customName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
-    { label: '商机名称', key: 'businessOpportunityName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
+    { label: `${businessLabel}名称`, key: 'businessOpportunityName', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
     { label: '订单金额', key: 'price', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
     { label: '回款状态', key: 'receivedStatus', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },
     { label: '已回款金额', key: 'receivedPayment', value: '', labelClass: 'w-[115px] text-right text-gray-500', width: '48%' },

+ 5 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -203,11 +203,13 @@ const orderTemplate = ref({
   list: [],
   config: {}
 })
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const filterItems = ref<FilterItem[]>([
   { label: '订单编号', key: 'orderCode', type: 'input' },
   { label: '订单名称', key: 'orderName', type: 'input' },
   { label: '客户名称', key: 'customId', type: 'select', options: selectData.Customer },
-  { label: '商机名称', key: 'businessName', type: 'input' },
+  { label: `${businessLabel}名称`, key: 'businessName', type: 'input' },
   { label: '订单类型', key: 'ordertype', type: 'select', options: selectData.OrderType },
   { label: '回款状态', key: 'receivedStatus', type: 'select', options: selectData.RemittanceStatus },
   { label: '负责人', key: 'inchargerId', type: 'select', options: selectData.Personnel },
@@ -233,7 +235,7 @@ async function importBusiness(param: UploadRequestOptions) {
     allLoading.importLoading = false
   })
   if (res.code == 'ok') {
-    globalPopup?.showSuccess('导入成功' || '')
+    globalPopup?.showSuccess('导入成功')
     getTableList()
     return
   }
@@ -447,7 +449,7 @@ function setFilterItems() {
     { label: '订单编号', key: 'orderCode', type: 'input' },
     { label: '订单名称', key: 'orderName', type: 'input' },
     { label: '客户名称', key: 'customId', type: 'select', options: selectData.Customer },
-    { label: '商机名称', key: 'businessName', type: 'input' },
+    { label: `${businessLabel}名称`, key: 'businessName', type: 'input' },
     { label: '订单类型', key: 'orderType', type: 'select', options: selectData.OrderType },
     { label: '回款状态', key: 'receivedStatus', type: 'select', options: selectData.RemittanceStatus },
     { label: '负责人', key: 'inchargerId', type: 'select', options: selectData.Personnel },

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/component/relatedBusiness.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
         <div class="flex justify-between">
-            <div class="title">相关商机</div>
+            <div class="title">相关{{ businessLabel }}</div>
         </div>
         <div class="flex-1 overflow-auto pt-3">
             <el-table :data="relatedTaskstable" :show-overflow-tooltip="tableShowOverflowTooltip" border
@@ -37,6 +37,9 @@ const props = defineProps<{
     information: any
 }>()
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
+
 // 接收参数赋值
 function receiveAssignment(item: any) {
     relatedTaskstable.value = item.data.map((item: any) => {

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

@@ -21,7 +21,7 @@
             <el-form-item label="执行人:" label-width="7em" prop="executorName">
               <el-input v-model="searchForm.executorName" placeholder="请输入" />
             </el-form-item>
-            <el-form-item label="商机名称:" label-width="7em" prop="businessName">
+            <el-form-item :label="`${businessLabel}名称`" label-width="7em" prop="businessName">
               <el-input v-model="searchForm.businessName" placeholder="请输入" />
             </el-form-item>
             <el-form-item label="销售订单:" label-width="7em" prop="orderName">
@@ -100,7 +100,7 @@
                 </el-link>
               </template>
             </el-table-column>
-            <el-table-column prop="businessName" label="商机名称" header-align="center" align="center" width="200">
+            <el-table-column prop="businessName" :label="`${businessLabel}名称`" header-align="center" align="center" width="200">
               <template #default="scope">
                 <el-link :underline="false" type="primary"
                   @click="goDetail(scope.row, 'business', 'businessOpportunityId')">
@@ -220,6 +220,8 @@ const taskLoading = ref<saveLoadingType>("1");
 const restartPopUpWindowVisable = ref(false);
 const restartFrom = ref<any>({});
 const dateOfTheDay = ref<any>(dayjs().format('YYYY-MM-DD'))
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 
 function closeTaskModal() {
   taskModalVisible.value = false;

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

@@ -4,7 +4,7 @@
             <div class="title">基本信息</div>
             <div>
                 <el-button type="primary" v-permission="['threadEdit', userInfo.id == information.inchargerId]"
-                    @click="showVisible('newBusinessisible')" v-if="!information.isBo">转为商机</el-button>
+                    @click="showVisible('newBusinessisible')" v-if="!information.isBo">转为{{ businessLabel }}</el-button>
                 <el-button type="primary" @click="claimClues()" v-if="!information.inchargerName">认领</el-button>
                 <el-button type="primary" @click="showVisible('clueDialogVisible')" v-else>转移</el-button>
                 <el-button type="primary" @click="editClue(information)" v-permission="['tasksAdd']">编辑</el-button>
@@ -126,7 +126,7 @@
                     <h4 :id="titleId">{{ allText.businessisText }}</h4>
                     <div>
                         <el-button type="primary" @click="transferBusiness()" 
-                            :loading="allLoading.businessSaveLading">转为商机</el-button>
+                            :loading="allLoading.businessSaveLading">转为{{ businessLabel }}</el-button>
                         <el-button @click="closeVisible('newBusinessisible')">取消</el-button>
                     </div>
                 </div>
@@ -165,6 +165,8 @@ const props = defineProps<{
     data: any
 }>()
 
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目"; 
 const { userInfo } = useStore()
 const globalPopup = inject<GlobalPopup>('globalPopup')
 const emits = defineEmits(['refreshData']);
@@ -184,7 +186,7 @@ const dialogVisible = reactive({
 const allText = reactive({
     editClueText: '新建线索',
     clueText: '认领线索',
-    businessisText: '转为商机'
+    businessisText: `转为${businessLabel}`
 })
 const generateForm: any = ref(null) // 模板
 const clueTemplate = ref({

+ 1 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/type.d.ts

@@ -19,6 +19,7 @@ type ListByCodeType = (
   | "产品类型"
   | "产品单位"
   | "订单类型"
+  | "项目阶段"
 )[];
 
 type templateKey = { // 自定义模板键值

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/tools.ts

@@ -91,6 +91,7 @@ const listByCode = [
   { name: "客户行业", id: "CustomIndustry" },
   { name: "客户来源", id: "CustomSources" },
   { name: "商机阶段", id: "BusinessStage" },
+  { name: "项目阶段", id: "BusinessStage" },
   { name: "产品类型", id: "ProductType" },
   { name: "产品单位", id: "ProductUnit" },
   { name: "订单类型", id: "OrderType" },
@@ -280,11 +281,13 @@ export function judgmentaAmounteEqual(mob: any, arr: any) {
   const amounte = mob.amountOfMoney || 0;
   const totalAmounte = arr.reduce((pre: number, cur: any) => pre + (cur.totalPrice || 0), 0);
 
+  const isExistBusiness = sessionStorage.getItem("isExistBusiness");
+  const businessLabel = isExistBusiness === "1" ? "商机" : "项目";
   if (amounte != totalAmounte) {
     ElNotification.closeAll();
     ElNotification({
       title: '提示',
-      message: `商机金额${amounte > totalAmounte ? '大于' : '小于'}产品总金额,${amounte > totalAmounte ? '' : '请修改'}`,
+      message: `${businessLabel}金额${amounte > totalAmounte ? '大于' : '小于'}产品总金额,${amounte > totalAmounte ? '' : '请修改'}`,
       type: 'warning',
     });
     flag = true;

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/BusinessItemProductMapper.xml

@@ -35,7 +35,7 @@
         select bip.*
         from business_item_product bip
                  left join product p on bip.product_id = p.id
-        where bip.business_id = #{busOppId}
+        where bip.product_id = #{busOppId}
           and p.is_delete = 0
     </select>
 

+ 2 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/LeaveSheetController.java

@@ -19,7 +19,6 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -77,9 +76,9 @@ public class LeaveSheetController {
      * @return
      */
     @RequestMapping("/add")
-    public HttpRespMsg add(LeaveSheet sheet, @RequestParam(value = "files",required = false) MultipartFile[] files) {
+    public HttpRespMsg add(LeaveSheet sheet) {
         String userId = request.getHeader("Token");
-        return leaveSheetService.add(sheet, userId,files);
+        return leaveSheetService.add(sheet, userId);
 
     }
 

+ 27 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -890,17 +890,34 @@ public class TaskController {
             String name = userMapper.selectById(list.get(0).getCreatorId()).getName();
             list.get(0).setCreatorName(name);
         }
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",user.getCompanyId()));
         //查询任务的执行人
-        List<TaskExecutor> executorList = taskExecutorMapper.selectList(new QueryWrapper<TaskExecutor>().eq("task_id", t.getId()));
-        executorList.forEach(e->{
-            if(e.getServiceId()!=null){
-                Optional<SapProjectService> first = serviceList.stream().filter(s -> s.getId().equals(e.getServiceId())).findFirst();
-                if(first.isPresent()){
-                    e.setServiceName(first.get().getServiceName());
-                    e.setServiceCode(first.get().getServiceCode());
+//        List<TaskExecutor> executorList = taskExecutorMapper.selectList(new QueryWrapper<TaskExecutor>().eq("task_id", t.getId()));
+        List<TaskExecutor> executorList =taskExecutorMapper.getInfoWithFileCharge(t.getId());
+        if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+            executorList.forEach(e->{
+                e.setFileChargeOneName("$userName="+e.getChargeOneWxId()+"$");
+                e.setFileChargeTwoName("$userName="+e.getChargeTwoWxId()+"$");
+                if(e.getServiceId()!=null){
+                    Optional<SapProjectService> first = serviceList.stream().filter(s -> s.getId().equals(e.getServiceId())).findFirst();
+                    if(first.isPresent()){
+                        e.setServiceName(first.get().getServiceName());
+                        e.setServiceCode(first.get().getServiceCode());
+                    }
                 }
-            }
-        });
+            });
+        }else{
+            executorList.forEach(e->{
+                if(e.getServiceId()!=null){
+                    Optional<SapProjectService> first = serviceList.stream().filter(s -> s.getId().equals(e.getServiceId())).findFirst();
+                    if(first.isPresent()){
+                        e.setServiceName(first.get().getServiceName());
+                        e.setServiceCode(first.get().getServiceCode());
+                    }
+                }
+            });
+        }
+
         t.setExecutorList(executorList);
         //设置人员选择下拉列表
         List<User> userList = null;
@@ -1387,7 +1404,7 @@ public class TaskController {
         TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
 //        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",user.getCompanyId()));
 //        CompanyDingding dingding = companyDingdingService.getOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, user.getCompanyId()));
-        if(1 == timeType.getTaskFileCharge()){
+        if(0 != timeType.getTaskFileCharge()){
             //根据该任务下的文件所处的状态判断
             for (Task task : list) {
                 /**

+ 72 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskFilesController.java

@@ -84,6 +84,8 @@ public class TaskFilesController {
 
     @Resource
     private TaskFilesService taskFilesService;
+    @Autowired
+    private TaskExecutorMapper taskExecutorMapper;
 
     @PostMapping("/reUploadFile")
     public HttpRespMsg reUploadFile(@RequestParam Integer projectId,
@@ -102,14 +104,6 @@ public class TaskFilesController {
             msg.setError("您非文件上传人,无法重新上传");
             return msg;
         }
-        if (oldTaskFile.getDocumentId() == null) {
-            //仅当前任务上传的,需要把文件删掉
-            File dir = new File(uploadPath);
-            File targetFile = new File(dir, oldTaskFile.getServerName());
-            if (targetFile.exists()) {
-                targetFile.delete();
-            }
-        }
 
 //        StringBuilder fileNames = new StringBuilder();
         TaskFiles record = new TaskFiles();
@@ -119,8 +113,11 @@ public class TaskFilesController {
         record.setDocumentName(file.getOriginalFilename());
         record.setTaskId(taskId);
         record.setProjectId(projectId);
-        if(1 == timeType.getTaskFileCharge()){
+        record.setFileRejectReason(null);
+        if(0 != timeType.getTaskFileCharge()){
             record.setNeedFileCharge(1);
+        }
+        if(1 == timeType.getTaskFileCharge()){
             if(org.apache.commons.lang3.StringUtils.isBlank(department.getManagerId())){
                 msg.setError("员工所在部门无负责人,请重新设置");
                 return msg;
@@ -142,7 +139,40 @@ public class TaskFilesController {
                 record.setChargeOneStatus(0);
                 record.setChargeTwoStatus(0);
             }
+        } else if (2 == timeType.getTaskFileCharge()) {
+            record.setFinalChargeStatus(0);
+            if(1 == oldTaskFile.getChargeStage()){
+                record.setChargeOneStatus(0);
+            }else if(2 == oldTaskFile.getChargeStage()){
+                record.setChargeTwoStatus(0);
+            } else if (3 == oldTaskFile.getChargeStage()) {
+                record.setChargeStage(1);
+                record.setChargeOneStatus(0);
+                record.setChargeTwoStatus(0);
+            }
+            //重新上传文件根据文件上传人的该任务执行的审核人一、二
+            TaskExecutor taskExecutor = taskExecutorMapper.selectOne(new LambdaQueryWrapper<TaskExecutor>()
+                    .eq(TaskExecutor::getTaskId, taskId)
+                    .eq(TaskExecutor::getExecutorId, user.getId())
+            );
+            if(null == taskExecutor){
+                msg.setError("该任务下执行人无当前用户");
+                return msg;
+            }else{
+                record.setChargeOneId(taskExecutor.getFileChargeOneId());
+                record.setChargeTwoId(taskExecutor.getFileChargeTwoId());
+            }
+        }
+
+        if (oldTaskFile.getDocumentId() == null) {
+            //仅当前任务上传的,需要把文件删掉
+            File dir = new File(uploadPath);
+            File targetFile = new File(dir, oldTaskFile.getServerName());
+            if (targetFile.exists()) {
+                targetFile.delete();
+            }
         }
+
         if (file != null && !file.isEmpty()) {
             //截取文件后缀
             String fileSuffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
@@ -264,8 +294,10 @@ public class TaskFilesController {
         record.setServerName(document.getServerName());
         record.setUrl(document.getUrl());
         TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
-        if(1 == timeType.getTaskFileCharge()){
+        if(0 != timeType.getTaskFileCharge()){
             record.setNeedFileCharge(1);
+        }
+        if(1 == timeType.getTaskFileCharge()){
             Department department = departmentMapper.selectById(user.getDepartmentId());
             Project project = projectMapper.selectById(taskId);
             if(org.apache.commons.lang3.StringUtils.isBlank(department.getManagerId())){
@@ -278,6 +310,19 @@ public class TaskFilesController {
             }
             record.setChargeOneId(department.getManagerId());
             record.setChargeTwoId(project.getInchargerId());
+        } else if (2 == timeType.getTaskFileCharge()) {
+            //重新上传文件根据文件上传人的该任务执行的审核人一、二
+            TaskExecutor taskExecutor = taskExecutorMapper.selectOne(new LambdaQueryWrapper<TaskExecutor>()
+                    .eq(TaskExecutor::getTaskId, taskId)
+                    .eq(TaskExecutor::getExecutorId, user.getId())
+            );
+            if(null == taskExecutor){
+                msg.setError("该任务下执行人无当前用户");
+                return msg;
+            }else{
+                record.setChargeOneId(taskExecutor.getFileChargeOneId());
+                record.setChargeTwoId(taskExecutor.getFileChargeTwoId());
+            }
         }
         taskFilesMapper.insert(record);
 
@@ -340,8 +385,10 @@ public class TaskFilesController {
             fileNames.append(file.getOriginalFilename()).append(",");
             record.setTaskId(taskId);
             record.setProjectId(projectId);
-            if(1 == timeType.getTaskFileCharge()){
+            if(0 != timeType.getTaskFileCharge()){
                 record.setNeedFileCharge(1);
+            }
+            if(1 == timeType.getTaskFileCharge()){
                 if (department == null) {
                     msg.setError("您无所属部门,请重新设置");
                     return msg;
@@ -356,6 +403,19 @@ public class TaskFilesController {
                 }
                 record.setChargeOneId(department.getManagerId());
                 record.setChargeTwoId(project.getInchargerId());
+            }else if(2 == timeType.getTaskFileCharge()) {
+                //重新上传文件根据文件上传人的该任务执行的审核人一、二
+                TaskExecutor taskExecutor = taskExecutorMapper.selectOne(new LambdaQueryWrapper<TaskExecutor>()
+                        .eq(TaskExecutor::getTaskId, taskId)
+                        .eq(TaskExecutor::getExecutorId, user.getId())
+                );
+                if(null == taskExecutor){
+                    msg.setError("该任务下执行人无当前用户");
+                    return msg;
+                }else{
+                    record.setChargeOneId(taskExecutor.getFileChargeOneId());
+                    record.setChargeTwoId(taskExecutor.getFileChargeTwoId());
+                }
             }
             if (file != null && !file.isEmpty()) {
                 //截取文件后缀
@@ -560,7 +620,7 @@ public class TaskFilesController {
             for (TaskFiles taskFiles : list) {
                 String fileChargeStatusText = "";
                 int fileChargeStatus = 0;
-                if(1 == timeType.getTaskFileCharge()){
+                if(0 != timeType.getTaskFileCharge()){
                     if(0 == taskFiles.getNeedFileCharge()){
                         fileChargeStatusText = "无审核状态";
                         fileChargeStatus = 3;

+ 13 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LeaveSheet.java

@@ -1,19 +1,19 @@
 package com.management.platform.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.time.LocalDate;
-import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
-
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
 /**
  * <p>
  * 
@@ -161,6 +161,13 @@ public class LeaveSheet extends Model<LeaveSheet> {
     @TableField(exist = false)
     private String dept;
 
+//    @TableField(exist = false)
+//    private List<LeaveSheetFiles> leaveSheetFiles;
+
+    /**请假凭证 逗号分隔*/
+    @TableField("file_urls")
+    private String fileUrls;
+
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 0 - 59
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LeaveSheetFiles.java

@@ -1,59 +0,0 @@
-package com.management.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class LeaveSheetFiles extends Model<LeaveSheetFiles> {
-    private static final long serialVersionUID=1L;
-
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    @TableField("leave_sheet_id")
-    private Integer leaveSheetId;
-
-    @TableField("document_name")
-    private String documentName;
-
-    @TableField("server_name")
-    private String serverName;
-
-    @TableField("url")
-    private String url;
-
-    @TableField("indate")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date indate;
-
-    @TableField("size")
-    private String size;
-
-    @TableField("document_type")
-    private Integer documentType;
-
-    /**
-     * 上传人id
-     */
-    @TableField("creator_id")
-    private String creatorId;
-
-    /**
-     * 上传人姓名
-     */
-    @TableField("creator_name")
-    private String creatorName;
-
-}

+ 24 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TaskExecutor.java

@@ -1,17 +1,17 @@
 package com.management.platform.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * <p>
  * 
@@ -79,6 +79,24 @@ public class TaskExecutor extends Model<TaskExecutor> {
     @TableField(exist = false)
     private String serviceCode;
 
+    /**文件审核人一[自选]id*/
+    @TableField("file_charge_one_id")
+    private String fileChargeOneId;
+
+    @TableField(exist = false)
+    private String fileChargeOneName;
+
+    @TableField(exist = false)
+    private String chargeOneWxId;
+    /**文件审核人二[自选]id*/
+    @TableField("file_charge_two_id")
+    private String fileChargeTwoId;
+
+    @TableField(exist = false)
+    private String fileChargeTwoName;
+
+    @TableField(exist = false)
+    private String chargeTwoWxId;
 
     @Override
     protected Serializable pkVal() {

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -621,7 +621,7 @@ public class TimeType extends Model<TimeType> {
     private Integer forceRejectReason;
 
     /**
-     * 任务文件审核 0不启用 1启用
+     * 任务文件审核 0不启用 1启用且自动填充 2启用且下拉选择
      */
     @TableField("task_file_charge")
     private Integer taskFileCharge;

+ 0 - 7
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/LeaveSheetFilesMapper.java

@@ -1,7 +0,0 @@
-package com.management.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.management.platform.entity.LeaveSheetFiles;
-
-public interface LeaveSheetFilesMapper extends BaseMapper<LeaveSheetFiles> {
-}

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/TaskExecutorMapper.java

@@ -2,6 +2,9 @@ package com.management.platform.mapper;
 
 import com.management.platform.entity.TaskExecutor;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface TaskExecutorMapper extends BaseMapper<TaskExecutor> {
 
+    List<TaskExecutor> getInfoWithFileCharge(@Param("taskId") Integer taskId);
 }

+ 1 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/LeaveSheetService.java

@@ -3,7 +3,6 @@ package com.management.platform.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.management.platform.entity.LeaveSheet;
 import com.management.platform.util.HttpRespMsg;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.List;
@@ -18,7 +17,7 @@ import java.util.List;
  */
 public interface LeaveSheetService extends IService<LeaveSheet> {
 
-    HttpRespMsg add(LeaveSheet sheet, String userId, MultipartFile[] files);
+    HttpRespMsg add(LeaveSheet sheet, String userId);
 
     HttpRespMsg delete(Integer id);
 

+ 1 - 82
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/LeaveSheetServiceImpl.java

@@ -11,20 +11,16 @@ import com.management.platform.controller.AuditWorkflowSettingController;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.SysRichFunction;
 import com.management.platform.entity.vo.UserRestTimeVO;
-import com.management.platform.exception.FileCheckException;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
-import com.management.platform.task.SFTPAsyncUploader;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
 import com.management.platform.util.WorkDayCalculateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -84,37 +80,9 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
     @Value(value = "${upload.path}")
     private String path;
 
-    @Autowired
-    private SFTPAsyncUploader sftpAsyncUploader;
-
-    @Resource
-    private LeaveSheetFilesMapper leaveSheetFilesMapper;
-
-    public void checkFile(MultipartFile file) throws FileCheckException {
-        if(file.isEmpty()){
-            throw new FileCheckException("文件大小不能为0");
-        }
-        if(org.apache.commons.lang3.StringUtils.isBlank(file.getOriginalFilename())){
-            throw new FileCheckException("文件名不能为空");
-        }
-        if(file.getOriginalFilename().split("\\.").length > 2){
-            throw new FileCheckException("文件名中.不能出现多个");
-        }
-    }
-
     @Override
-    public HttpRespMsg add(LeaveSheet sheet, String userId, MultipartFile[] files) {
+    public HttpRespMsg add(LeaveSheet sheet, String userId) {
         HttpRespMsg msg = new HttpRespMsg();
-//        if(null != files && files.length > 0){
-//            try {
-//                for (MultipartFile file : files) {
-//                    checkFile(file);
-//                }
-//            } catch (FileCheckException e) {
-//                msg.setError(e.getMessage());
-//                return msg;
-//            }
-//        }
         boolean isNew = false;
         if (sheet.getId() == null) {
             isNew = true;
@@ -186,55 +154,6 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
         if (wxCorpInfo != null) {
             sendAuditNotifyMsg(wxCorpInfo, user, sheet);
         }
-//        if(null != files && files.length > 0){
-//            for (MultipartFile file : files) {
-//                LeaveSheetFiles leaveSheetFiles = new LeaveSheetFiles();
-//                leaveSheetFiles.setDocumentName(file.getOriginalFilename());
-//                leaveSheetFiles.setLeaveSheetId(sheet.getId());
-//                leaveSheetFiles.setCreatorId(userId);
-//                leaveSheetFiles.setCreatorName(user.getName());
-//                String fileSuffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
-//                leaveSheetFiles.setDocumentType(DocumentTypeUtil.DocumentType(fileSuffix));
-//                //处理文件
-//                File dir = new File(path);
-//                if (!dir.exists()) {
-//                    dir.mkdir();
-//                }
-//                String fileName = "";
-//                if (file != null && !file.isEmpty()) {
-//                    fileName = file.getOriginalFilename();
-//
-//                    int pos = fileName.lastIndexOf(".");
-//                    String suffix = fileName.substring(pos).toLowerCase();
-//                    //用uuid替换原始的文件名
-//                    String purFName = UUID.randomUUID().toString().replaceAll("-", "");
-//                    fileName = purFName + suffix;
-//                    File saveFile = new File(dir, fileName);
-//                    try {
-//                        saveFile.createNewFile();
-//                        file.transferTo(saveFile);
-//                        //异步上传到备份服务器
-//                        sftpAsyncUploader.uploadFileAsync(saveFile);
-//                        //计算文件大小
-//                        long fileSize = saveFile.length();
-//                        String fileLength = FileUtil.getReadableFileSize(fileSize);
-//                        leaveSheetFiles.setServerName(path + fileName);
-//                        leaveSheetFiles.setSize(fileLength);
-//                        String pathPrefix = "/upload/";
-//                        leaveSheetFiles.setUrl(pathPrefix + fileName);
-//                        leaveSheetFilesMapper.insert(leaveSheetFiles);
-//                    } catch (IOException e) {
-//                        e.printStackTrace();
-//                        fileName = null;
-//                        msg.setError(e.getMessage() + ", path=" + dir.getAbsolutePath());
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                        fileName = null;
-//                        msg.setError(e.getMessage() + ", path=" + dir.getAbsolutePath());
-//                    }
-//                }
-//            }
-//        }
 
         return msg;
     }

+ 94 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskFilesServiceImpl.java

@@ -66,11 +66,27 @@ public class TaskFilesServiceImpl extends ServiceImpl<TaskFilesMapper, TaskFiles
                             .eq(TaskFiles::getFinalChargeStatus,0)
                             .eq(TaskFiles::getNeedFileCharge,1)
                     .in(TaskFiles::getId,ids));
+            List<TaskFiles> multiChargeList = taskFilesList.stream().filter(t -> {
+                if (t.getChargeOneId().equals(t.getChargeTwoId())) {
+                    return false;
+                } else {
+                    return true;
+                }
+            }).collect(Collectors.toList());
+            List<TaskFiles> singleChargeList = taskFilesList.stream().filter(t -> {
+                if (t.getChargeOneId().equals(t.getChargeTwoId())) {
+                    return true;
+                } else {
+                    return false;
+                }
+            }).collect(Collectors.toList());
+
             //通过
             List<Integer> stageOneToUpdateList = new ArrayList<>();
             List<Integer> stageTwoToUpdateList = new ArrayList<>();
+            //审核人一、二如果是同一个,则通过直接结束,驳回返回阶段一
             List<TaskComment> commentList = new ArrayList<>();
-            for (TaskFiles taskFiles : taskFilesList) {
+            for (TaskFiles taskFiles : multiChargeList) {
                 //判断所处阶段
                 if(1 == taskFiles.getChargeStage()){
                     stageOneToUpdateList.add(taskFiles.getId());
@@ -87,6 +103,17 @@ public class TaskFilesServiceImpl extends ServiceImpl<TaskFilesMapper, TaskFiles
                 comment.setUserName(user.getName());
                 commentList.add(comment);
             }
+            for (TaskFiles taskFiles : singleChargeList) {
+                String content = user.getName()+"审核通过了任务文件【"+taskFiles.getDocumentName()+"】";
+                TaskComment comment =  new TaskComment();
+                comment.setTaskId(taskFiles.getTaskId());
+                comment.setUserId(user.getId());
+                comment.setContent(content);
+                comment.setCreateTime(LocalDateTime.now());
+                comment.setUserColor(user.getColor());
+                comment.setUserName(user.getName());
+                commentList.add(comment);
+            }
             if(CollectionUtils.isNotEmpty(stageOneToUpdateList)){
                 taskFilesMapper.update(null,new LambdaUpdateWrapper<TaskFiles>()
                         .set(TaskFiles::getChargeStage,2)
@@ -106,6 +133,19 @@ public class TaskFilesServiceImpl extends ServiceImpl<TaskFilesMapper, TaskFiles
                         .in(TaskFiles::getId,stageTwoToUpdateList)
                 );
             }
+            if(CollectionUtils.isNotEmpty(singleChargeList)){
+                List<Integer> collect = singleChargeList.stream().map(TaskFiles::getId).collect(Collectors.toList());
+                taskFilesMapper.update(null,new LambdaUpdateWrapper<TaskFiles>()
+                        .set(TaskFiles::getChargeStage,3)
+                        .set(TaskFiles::getFinalChargeStatus,1)
+                        .set(TaskFiles::getChargeOneStatus,1)
+                        .set(TaskFiles::getChargeTwoStatus,1)
+                        .set(TaskFiles::getChargeOneTime,new Date())
+                        .set(TaskFiles::getChargeTwoTime,new Date())
+                        .set(TaskFiles::getFileRejectReason,null)
+                        .in(TaskFiles::getId,collect)
+                );
+            }
             if(CollectionUtils.isNotEmpty(commentList)){
                 taskCommentMapper.insertBatch(commentList);
             }
@@ -132,12 +172,26 @@ public class TaskFilesServiceImpl extends ServiceImpl<TaskFilesMapper, TaskFiles
                     .eq(TaskFiles::getFinalChargeStatus,0)
                     .in(TaskFiles::getId,ids)
             );
+            List<TaskFiles> multiChargeList = taskFiles.stream().filter(t -> {
+                if (t.getChargeOneId().equals(t.getChargeTwoId())) {
+                    return false;
+                } else {
+                    return true;
+                }
+            }).collect(Collectors.toList());
+            List<TaskFiles> singleChargeList = taskFiles.stream().filter(t -> {
+                if (t.getChargeOneId().equals(t.getChargeTwoId())) {
+                    return true;
+                } else {
+                    return false;
+                }
+            }).collect(Collectors.toList());
             List<Integer> stageOneToUpdateList = new ArrayList<>();
             List<Integer> stageTwoToUpdateList = new ArrayList<>();
 //            StringBuilder userNames = new StringBuilder();
             Map<String,String> remindMap = new HashMap<>();
             List<TaskComment> commentList = new ArrayList<>();
-            for (TaskFiles taskFile : taskFiles) {
+            for (TaskFiles taskFile : multiChargeList) {
                 if(1 == taskFile.getChargeStage()){
                     //阶段一,更新阶段一状态
                     stageOneToUpdateList.add(taskFile.getId());
@@ -152,6 +206,13 @@ public class TaskFilesServiceImpl extends ServiceImpl<TaskFilesMapper, TaskFiles
 //                }else{
 //                    userNames.append(tmpUser.getName()).append(",");
 //                }
+                if(remindMap.containsKey(tmpUser.getCorpwxUserid())){
+                    String s = remindMap.get(tmpUser.getCorpwxUserid());
+                    s += "任务文件【"+taskFile.getDocumentName()+"】因【"+reason+"】被驳回,请及时处理";
+                    remindMap.put(tmpUser.getCorpwxUserid(),s);
+                }else{
+                    remindMap.put(tmpUser.getCorpwxUserid(),"任务文件【"+taskFile.getDocumentName()+"】因【"+reason+"】被驳回,请及时处理");
+                }
                 remindMap.put(tmpUser.getCorpwxUserid(),"任务文件【"+taskFile.getDocumentName()+"】因【"+reason+"】被驳回,请及时处理");
                 String content = user.getName()+"审核驳回了任务文件【"+taskFile.getDocumentName()+"】";
                 TaskComment comment =  new TaskComment();
@@ -163,6 +224,26 @@ public class TaskFilesServiceImpl extends ServiceImpl<TaskFilesMapper, TaskFiles
                 comment.setUserName(user.getName());
                 commentList.add(comment);
             }
+            for (TaskFiles taskFile : singleChargeList) {
+                User tmpUser = companyUserMap.get(taskFile.getCreatorId());
+                if(remindMap.containsKey(tmpUser.getCorpwxUserid())){
+                    String s = remindMap.get(tmpUser.getCorpwxUserid());
+                    s += "任务文件【"+taskFile.getDocumentName()+"】因【"+reason+"】被驳回,请及时处理";
+                    remindMap.put(tmpUser.getCorpwxUserid(),s);
+                }else{
+                    remindMap.put(tmpUser.getCorpwxUserid(),"任务文件【"+taskFile.getDocumentName()+"】因【"+reason+"】被驳回,请及时处理");
+                }
+
+                String content = user.getName()+"审核驳回了任务文件【"+taskFile.getDocumentName()+"】";
+                TaskComment comment =  new TaskComment();
+                comment.setTaskId(taskFile.getTaskId());
+                comment.setUserId(user.getId());
+                comment.setContent(content);
+                comment.setCreateTime(LocalDateTime.now());
+                comment.setUserColor(user.getColor());
+                comment.setUserName(user.getName());
+                commentList.add(comment);
+            }
             if(CollectionUtils.isNotEmpty(stageOneToUpdateList)){
                 //阶段一,更新阶段一状态
                 taskFilesMapper.update(null,new LambdaUpdateWrapper<TaskFiles>()
@@ -180,6 +261,17 @@ public class TaskFilesServiceImpl extends ServiceImpl<TaskFilesMapper, TaskFiles
                         .in(TaskFiles::getId,stageTwoToUpdateList)
                 );
             }
+            if(CollectionUtils.isNotEmpty(singleChargeList)){
+                List<Integer> collect = singleChargeList.stream().map(TaskFiles::getId).collect(Collectors.toList());
+                taskFilesMapper.update(null,new LambdaUpdateWrapper<TaskFiles>()
+                        .set(TaskFiles::getFileRejectReason,reason)
+                        .set(TaskFiles::getChargeOneTime,new Date())
+                        .set(TaskFiles::getChargeTwoTime,new Date())
+                        .set(TaskFiles::getChargeOneStatus,2)
+                        .set(TaskFiles::getChargeStage,1)
+                        .in(TaskFiles::getId,collect)
+                );
+            }
 
             if(CollectionUtils.isNotEmpty(commentList)){
                 taskCommentMapper.insertBatch(commentList);

+ 11 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TaskExecutorMapper.xml

@@ -17,7 +17,17 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, task_id, executor_id, executor_name, executor_color, plan_hours, project_id, service_id, real_cost
+        id, task_id, executor_id, executor_name, executor_color, plan_hours, project_id, service_id, real_cost, file_charge_one_id, file_charge_two_id
     </sql>
+    <select id="getInfoWithFileCharge" resultType="com.management.platform.entity.TaskExecutor">
+        select task_id, executor_id, executor_name, executor_color, plan_hours, project_id
+             , service_id, real_cost, file_charge_one_id, file_charge_two_id
+             , u1.name as fileChargeOneName,u1.corpwx_userid as chargeOneWxId
+             ,u2.name as fileChargeTwoName,u2.corpwx_userid  as chargeTwoWxId
+        from task_executor te
+                 left join man_dev.user u1 on te.file_charge_one_id = u1.id
+                 left join man_dev.user u2 on te.file_charge_two_id = u2.id
+        where task_id = #{taskId}
+    </select>
 
 </mapper>

+ 2 - 2
fhKeeper/formulahousekeeper/ops-platform/src/main/resources/application-prod.yml

@@ -13,9 +13,9 @@ spring:
       max-request-size: 100MB
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.100.37.243:7644/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
+    url: jdbc:mysql://localhost:3306/man_xin?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
-    password: Ziyu20141026!@@
+    password: 123456
     hikari:
       maximum-pool-size: 10
       minimum-idle: 3

+ 29 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -1833,9 +1833,13 @@
         <!-- 详细费用 -->
         <el-dialog :title="`${otherExpensesRow.projectName}支出明细(元)`" :visible.sync="otherExpensesVisable" width="800px" top="5.6vh" :before-close="handleClose">
           <div>
-            <el-table :data="otherExpensesRow.projectExpenseFeeList" height="50vh" border style="width: 100%">
+            <el-table :data="otherExpensesRow.projectExpenseFeeList" height="50vh" border style="width: 100%" show-summary :summary-method="expensesSummaries">
               <el-table-column prop="typeName" align="center" label="名称"></el-table-column>
-              <el-table-column prop="amount" align="center" label="费用(元)"></el-table-column>
+              <el-table-column prop="amount" align="center" label="费用(元)">
+                <template slot-scope="scope">
+                  {{ (scope.row.amount || 0).toFixed(2) }}
+                </template>
+              </el-table-column>
             </el-table>
           </div>
           <span slot="footer" class="dialog-footer">
@@ -2198,6 +2202,29 @@ export default {
       }
   },
   methods: {
+    expensesSummaries(param) {
+      const { columns, data } = param;
+        const sums = [];
+        columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '总计';
+          return;
+        }
+        const values = data.map(item => Number(item[column.property]));
+        if (!values.every(value => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index] = (sums[index]).toFixed(2)
+        }
+      });
+      return sums;
+    },
     showOtherExpensesClick(row) {
       console.log(row, '<====== showOtherExpensesClick')
       this.otherExpensesRow = {

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -1824,8 +1824,8 @@ export default {
       if (this.auditTypeItem.auditType == 0 || this.auditTypeItem.auditType == 2) {
         this.denyForm.id = item.id
         this.denyForm.reason = ''
-        // this.denyReasonDialog = true
-        this.deny()
+        this.denyReasonDialog = true
+        // this.deny()
       } else {
         this.downloadByA(item);
         this.showSingleAudit = true;

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -1044,7 +1044,7 @@ export default {
   created() {
     let widTHBul = document.documentElement.clientWidth - 440
     this.kuanBl = widTHBul
-    this.hubs = (document.documentElement.clientHeight || document.body.clientHeight) - 70
+    this.hubs = (document.documentElement.clientHeight || document.body.clientHeight) - 140
     let height = window.innerHeight;
             this.tableHeight = height - 195;
             const that = this;