Przeglądaj źródła

动态监听合同额变化

songxy 11 miesięcy temu
rodzic
commit
e87cc9ee10

+ 2 - 0
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/index.vue

@@ -708,6 +708,7 @@ import { useProjectPermis } from '@/store/modules/projectPermis'
 import { DICT_TYPE, getDictOptions } from '@/utils/dict'
 import { openFlow } from '@/utils/flow'
 import { filterNodeMethod } from '@/utils/tree'
+import subscribe from '@/utils/Subscribe'
 import TreeSelectV2 from '@/components/TreeSelectV2/index.vue'
 import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
 import ContractMilestone from '@/views/OaSystem/projectCenter/projectDetail/components/xmht/ContractMilestone.vue'
@@ -873,6 +874,7 @@ const { mutate: saveContract } = useMutation(putContract, {
   },
   onSuccess: () => {
     void refetch()
+    subscribe.emit('mainContractRefetch', null)
     ElMessage({
       message: '保存合同成功',
       type: 'success'

+ 5 - 0
client/src/views/OaSystem/projectCenter/projectDetail/projectDetail.vue

@@ -191,6 +191,7 @@ import {
   startOutsourcingApply,
   startSubcontractApply
 } from '@/service/contract'
+import subscribe from '@/utils/Subscribe'
 import { openFlow, openProcessFlow } from '@/utils/flow'
 import { useMutation } from '@tanstack/vue-query'
 import { ProjectId } from '@/interface/project'
@@ -255,6 +256,10 @@ const queryProjectByDetail = async (projectId: string) => {
   }
 }
 queryProjectByDetail(query?.id as string)
+
+subscribe.on('mainContractRefetch', () => {
+  queryProjectByDetail(query?.id as string)
+})
 /**
  * 添加子项目
  * **/

+ 1 - 1
zjugis-business/src/main/resources/templates/TravelCost/js/index.js

@@ -165,7 +165,7 @@
         trDom.className = 'qjsjClass'
         trDom.innerHTML = '<td class="operation_icon"><span class="up_btn"></span><span class="down_btn"></span></td>'
             + '<td name="boat_car_seq">' + (i + 1)
-            + '<input type="hidden" name="TravelCostBoatCarDO[' + i + ']$indexCode" value="'+ (i + 1) +'">'
+            + '<input type="hidden" name="TravelCostBoatCarDO[' + i + ']$indexCode" value="'+ (i + 1) +'" />'
             + '</td>'
             + '<td>'
             + '<div class="form-flex">'