Ver Fonte

接口对接和字段调整

songxy há 1 ano atrás
pai
commit
8f2379bc3f

+ 13 - 0
client/src/service/contract.ts

@@ -88,6 +88,19 @@ export const getContractPaymentList = async (contractId: ContractId) => {
   )
 }
 
+/**
+ * 合同付款汇总
+ * @param contractId
+ */
+export const getContractPaymentCalc = async (contractId: ContractId) => {
+  return await request.get(
+    {
+      url: '/contract-payment/calc',
+      params: { contractId }
+    },
+    '/business'
+  )
+}
 /**
  * 合同查分包金额承担信息
  * @param contractId

+ 1 - 1
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/ContractMilestone.vue

@@ -39,7 +39,7 @@ const { mutate: getContractMilestoneListMutate } = useMutation(getContractMilest
       </thead>
       <tbody>
         <tr v-for="(item, index) in contractMilestoneList" :key="index">
-          <td>{{ index }}</td>
+          <td>{{ index + 1 }}</td>
           <td>{{ item['name'] }}</td>
           <td>{{ (item['actualReturnAmount'] / (item['returnAmount'] || 1)) * 100 }}</td>
           <td>{{ item['returnAmount'] }}</td>

+ 1 - 1
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/ContractReturnedMoney.vue

@@ -55,7 +55,7 @@ const invoiceTypeFilter: (val: number | string) => string = (val: number | strin
       </thead>
       <tbody>
         <tr v-for="(item, index) in contractRMoneyList" :key="index">
-          <td>{{ index }}</td>
+          <td>{{ index + 1 }}</td>
           <td>{{ item['contractMilestoneName'] }}</td>
           <td>{{ item['flowStatus'] }}</td>
           <td>{{ item['invoiceAmount'] }}</td>

+ 12 - 9
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/index.vue

@@ -316,8 +316,8 @@
               <td class="th">是否需要签订合同:</td>
               <td>
                 <el-radio-group v-model="childContractDetail.isSign" :disabled="!editor">
-                  <el-radio label="1">是</el-radio>
-                  <el-radio label="0">否</el-radio>
+                  <el-radio :label="1">是</el-radio>
+                  <el-radio :label="0">否</el-radio>
                 </el-radio-group>
               </td>
               <td class="th">分包费用承担:</td>
@@ -402,9 +402,9 @@
           <table>
             <tr>
               <td class="th">已付款金额(元):</td>
-              <td></td>
+              <td>{{ calcInfo?.pay }}</td>
               <td class="th">合同余额(元):</td>
-              <td></td>
+              <td>{{ calcInfo?.balance }}</td>
             </tr>
           </table>
         </div>
@@ -425,7 +425,7 @@ import {
   startContractInvoice,
   queryCustomerTree,
   queryCompanyTree,
-  getContractPaymentList
+  getContractPaymentCalc
 } from '@/service/contract'
 import { useQuery, useMutation } from '@tanstack/vue-query'
 import { Contract } from '@/interface/contract'
@@ -520,10 +520,13 @@ const { refetch } = useQuery(
   }
 )
 //查询分包付款数据
-const { mutate: queryContractPaymentMutate } = useMutation(getContractPaymentList, {
+const calcInfo = ref<{
+  balance: number
+  pay: number
+}>()
+const { mutate: queryContractPaymentCalcMutate } = useMutation(getContractPaymentCalc, {
   onSuccess: (data) => {
-    console.log('data--------------------------')
-    console.log(data)
+    calcInfo.value = data
   }
 })
 
@@ -554,7 +557,7 @@ const switchContractInfo = (item: any, key: number, mKey?: number): void => {
     }
   } else {
     childContractDetail.value = item
-    queryContractPaymentMutate(item.id)
+    queryContractPaymentCalcMutate(item.id)
   }
 }