Pārlūkot izejas kodu

办件中心ws功能完善

songxy 1 gadu atpakaļ
vecāks
revīzija
2120e86160

+ 15 - 0
client/src/interface/contract.ts

@@ -283,3 +283,18 @@ export interface ExtraConstract {
    */
   subShareWay?: number
 }
+
+export interface ContractSub {
+  id: string
+  contractAmount: number
+  reason: string
+  purchaseRequirements: string
+  subShareWay: number
+  customerContact: string
+  customerId: string
+  contractOn: string
+  contractOff: string
+  planSignDate: string
+  paymentTerms: string
+  bz: string
+}

+ 3 - 0
client/src/main.ts

@@ -60,6 +60,9 @@ window.addEventListener('message', (evt) => {
       subscribe.emit('closeCurrentView', null)
       return;
     }
+    if (eData.msgreceiveevent === 'updateHandleCenterCorner') {
+      subscribe.emit('updateHandleCenterCorner', null)
+    }
     if (payload && payload['title']) {
       const lRoutePayload = LinkRouteMap[payload['title']]
       if (lRoutePayload) {

+ 14 - 1
client/src/service/contract.ts

@@ -1,5 +1,5 @@
 import request from '@/config/axios'
-import { Contract, ContractId } from '@/interface/contract'
+import { Contract, ContractId, ContractSub } from '@/interface/contract'
 import { ProjectId } from '@/interface/project'
 import { listToTree } from '@/utils/tree'
 
@@ -61,6 +61,19 @@ export const putContract = async (contract: Contract) => {
   )
 }
 
+/**
+ * 编辑保存分包外包合同信息
+ * @param contract
+ */
+export const putContractSub = async (contract: ContractSub) => {
+  return await request.put(
+    {
+      url: '/contractSub',
+      data: contract
+    },
+    '/business'
+  )
+}
 /**
  * 合同里程碑
  * @param contractId

+ 5 - 1
client/src/views/OaSystem/oaLayout/menus.vue

@@ -54,6 +54,7 @@ import MenusActive from './menusActive.vue'
 import { useQuery } from '@tanstack/vue-query'
 import { getRecordsDetail } from '@/api/oa/staffRecords'
 import { getAttendCount } from '@/api/oa/index'
+import subscribe from '@/utils/Subscribe'
 
 defineOptions({ name: 'Header' })
 const { t } = useI18n()
@@ -89,7 +90,10 @@ const initAttendCount = async () => {
   }
 }
 initAttendCount()
-
+subscribe.on('updateHandleCenterCorner', () => {
+  //同步更新办件中心角标
+  initAttendCount()
+})
 const mouseenterIndex = ref(-1)
 const loginOut = () => {
   ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {

+ 24 - 15
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/index.vue

@@ -452,7 +452,7 @@
               <td class="th">供应商:</td>
               <td>
                 <el-select
-                  v-model="cContractDetail.supplierId"
+                  v-model="cContractDetail.customerId"
                   :disabled="!editor"
                   style="width: 100%"
                 >
@@ -490,21 +490,14 @@
               </td>
             </tr>
             <tr>
-              <!-- <td class="th">是否需要签订合同:</td>
-              <td>
-                <el-radio-group v-model="cContractDetail.isSign" :disabled="!editor">
-                  <el-radio :label="1">是</el-radio>
-                  <el-radio :label="0">否</el-radio>
-                </el-radio-group>
-              </td> -->
               <td class="th">签订时间:</td>
               <td>
                 <el-date-picker
                   style="width: 100%"
                   :disabled="!editor"
-                  v-model="cContractDetail.qualityControllerId"
+                  v-model="cContractDetail.planSignDate"
                   type="date"
-                  @change="($evt) => (cContractDetail.contractOff = $evt)"
+                  @change="($evt) => (cContractDetail.planSignDate = $evt)"
                   placeholder="请选择合签订时间"
                 />
               </td>
@@ -559,7 +552,7 @@
               <td class="th">供应商:</td>
               <td>
                 <el-select
-                  v-model="cContractDetail.supplierId"
+                  v-model="cContractDetail.customerId"
                   :disabled="!editor"
                   style="width: 100%"
                 >
@@ -648,7 +641,7 @@
               <td class="th">已付款金额(元):</td>
               <td>{{ calcInfo?.pay ?? 0 }}</td>
               <td class="th">合同余额(元):</td>
-              <td>{{ calcInfo?.balance ?? 0 }}</td>
+              <td>{{ cContractDetail.contractAmount - (calcInfo?.pay || 0) }}</td>
             </tr>
           </table>
         </div>
@@ -669,6 +662,7 @@ import ContractReturnedMoney from '@/views/OaSystem/projectCenter/projectDetail/
 import {
   getContractsByProject,
   putContract,
+  putContractSub,
   startUseMoney,
   startContractInvoice,
   queryCustomerTree,
@@ -799,13 +793,28 @@ const saveContractHandle = () => {
     //主合同
     saveContract(mContractDetail.value)
   } else {
-    saveContract(cContractDetail.value)
+    saveContractSub(cContractDetail.value)
   }
 }
 /**
- * 编辑保存合同信息
+ * 编辑保存主合同信息
+ * **/
+const { mutate: saveContractSub } = useMutation(putContract, {
+  onMutate: () => {
+    editor.value = false
+  },
+  onSuccess: () => {
+    void refetch()
+    ElMessage({
+      message: '保存合同成功',
+      type: 'success'
+    })
+  }
+})
+/**
+ * 编辑保存分包/外包合同信息
  * **/
-const { mutate: saveContract } = useMutation(putContract, {
+const { mutate: saveContract } = useMutation(putContractSub, {
   onMutate: () => {
     editor.value = false
   },

+ 1 - 1
client_h5/index.html

@@ -6,7 +6,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1">
     <script src='https://cdn.bootcss.com/vConsole/3.3.2/vconsole.min.js'></script>
     <script type="text/javascript">
-      // window.vConsole = new window.VConsole()
+      window.vConsole = new window.VConsole()
       window.locationBaseUrl = "/html_h5"
     </script>
     <title></title>

+ 3 - 0
zjugis-workflow/src/main/resources/templates/HandlerCaseCenter/js/index.js

@@ -35,6 +35,9 @@ var windowid;
 						} else {
 							if (data == "OFFICE_CENTER") {
 								z.ui.tab("[name=tab]").tabSelect(0);
+                                z.webcontainer.messager.send({
+                                    msgreceiveevent: 'updateHandleCenterCorner'
+								})
 							}
 						}
 					}