ソースを参照

新建办件H5集成

songxy 1 年間 前
コミット
a024502441

+ 2 - 1
client/src/utils/dict.ts

@@ -148,5 +148,6 @@ export enum DICT_TYPE {
   PROJECT_HY = 'project_hy',
   POST_TYPE = 'post_type',
   ABILITY_LEVEL = 'ABILITY_LEVEL',
-  INVOICE_OUT_STATUS = 'INVOICE_OUT_STATUS'
+  INVOICE_OUT_STATUS = 'INVOICE_OUT_STATUS',
+  INVOICE_TYPE = 'invoice_type'
 }

+ 10 - 1
client/src/views/OaSystem/marketCenter/contractSubOut/applyIndex.vue

@@ -106,10 +106,17 @@ import { ElMessage } from 'element-plus'
 import { PageParam } from '@/interface/common'
 import { openFlow } from '@/utils/flow'
 import request from '@/config/axios'
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 
 defineOptions({ name: 'ProjectBook' })
 const route = useRoute()
 const routeName = route.name
+let userId: string | undefined
+if (routeName === 'MyContractSubOut') {
+  const { wsCache } = useCache()
+  const user = wsCache.get(CACHE_KEY.USER)
+  userId = user.user.id ? user.user.id : ''
+}
 const contractType = {
   1: '分包合同',
   2: '外包合同'
@@ -130,13 +137,15 @@ interface QueryParams extends PageParam {
   projectName: string
   projectNumber: string
   applyType: number
+  userId?: string
 }
 const queryParams = reactive<QueryParams>({
   projectName: '',
   projectNumber: '',
   applyType: -1,
   pageNo: 1,
-  pageSize: 10
+  pageSize: 10,
+  userId: userId
 })
 
 /**

+ 10 - 3
client/src/views/OaSystem/marketCenter/contractSubOut/signIndex.vue

@@ -109,16 +109,21 @@ import { useRouter } from 'vue-router'
 import { ElMessage } from 'element-plus'
 import { openFlow } from '@/utils/flow'
 import { getAssetURL } from '@/utils/auth'
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 import request from '@/config/axios'
 
 defineOptions({ name: 'ProjectBook' })
 const router = useRouter()
 const route = useRoute()
 const routeName = route.name
-
 const tableRef: any = ref(null)
 const tableHeight: any = ref(0)
-
+let userId: string | undefined
+if (routeName === 'MyContractSubOutSign') {
+  const { wsCache } = useCache()
+  const user = wsCache.get(CACHE_KEY.USER)
+  userId = user.user.id ? user.user.id : ''
+}
 interface PageParam {
   pageNo: number
   pageSize: number
@@ -127,13 +132,15 @@ interface QueryParams extends PageParam {
   projectName: string
   projectNumber: string
   applyType: number
+  userId?: string
 }
 const queryParams = reactive<QueryParams>({
   projectName: '',
   projectNumber: '',
   applyType: -1,
   pageNo: 1,
-  pageSize: 10
+  pageSize: 10,
+  userId: userId
 })
 
 const infoList: any = ref([

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

@@ -1,5 +1,7 @@
 <script setup lang="ts">
 import { useMutation } from '@tanstack/vue-query'
+import { openProcessFlow } from '@/utils/flow'
+import { DICT_TYPE, getDictLabel } from '@/utils/dict'
 import { getContractReturnedMoneyList } from '@/service/contract'
 
 /**
@@ -22,29 +24,12 @@ const { mutate: getContractReturnedMoneyListMutate } = useMutation(getContractRe
   }
 })
 
-const invoiceTypeMap = {
-  '1': '增值税专用发票',
-  '2': '增值税普通发票',
-  '3': '服务业通用机打发票',
-  '4': '统一收款收据'
-}
-const invoiceTypeFilter: (val: number | string) => string = (val: number | string): string => {
-  if (!val) return ''
-  return invoiceTypeMap[val.toString()]
-}
 /**
  * 流程查看
  */
 const router = useRouter()
 const processLookHandle = (row) => {
-  router.push({
-    path: '/processLook',
-    query: {
-      url: `${
-        import.meta.env.VITE_PROCESS_DETAIL_URI
-      }/IFlowInstance/redirectFlowPage?flowInstanceId=${row?.instanceId}`
-    }
-  })
+  openProcessFlow(router, row.invoiceInstanceId)
 }
 </script>
 
@@ -71,13 +56,15 @@ const processLookHandle = (row) => {
         <tr v-for="(item, index) in contractRMoneyList" :key="index">
           <td>{{ index + 1 }}</td>
           <td>{{ item['contractMilestoneName'] }}</td>
-          <td>{{ item['flowStatus'] }}</td>
+          <td>
+            {{ getDictLabel(DICT_TYPE.INVOICE_OUT_STATUS, item['flowStatus']) }}
+          </td>
           <td>{{ item['invoiceAmount'] }}</td>
           <td>{{ item['actualReturnAmount'] }}</td>
           <td>{{ item['invoiceContent'] }}</td>
           <td>{{ item['invoiceDate'] }}</td>
           <td>{{ item['invoiceNo'] }}</td>
-          <td>{{ invoiceTypeFilter(item['invoiceType']) }}</td>
+          <td>{{ getDictLabel(DICT_TYPE.INVOICE_TYPE, item['invoiceType']) }}</td>
           <td>{{ item['returnDate'] }}</td>
           <td>
             <span

+ 1 - 1
client_h5/.env.dev

@@ -1,3 +1,3 @@
-VITE_BASE_URL='http://10.10.10.7:48080/'
+VITE_BASE_URL='http://localhost:6090/'
 
 VITE_AUTHORIZATION='test83e06d0d-af60-4419-9437-c9a68bf1b669'

+ 17 - 12
client_h5/src/pages/home/index.vue

@@ -1,6 +1,7 @@
 <script setup lang="ts">
 import { useUserStoreWithOut } from "@/stores/modules/user";
 import { getAssetsURI } from "@/utils/common";
+import reqest from "@/utils/request";
 
 const userStore = useUserStoreWithOut();
 
@@ -34,27 +35,33 @@ const navMenus: MenuItem[] = [
     icon: "../assets/images/wdxx_icon.png",
   },
 ];
-
-const processMenus: MenuItem[] = [
+interface ProcessMenuItem extends MenuItem { 
+  instanceId: string
+}
+const processMenus: ProcessMenuItem[] = [
   {
     title: "请假申请",
     corner: 0,
     icon: "../assets/images/qjsq_icon.png",
+    instanceId: '018c1f593f2c09477b1b8c1080b6000b'
   },
   {
     title: "出差申请",
     corner: 0,
     icon: "../assets/images/ccsq_icon.png",
+    instanceId: '018c389986fb0947969a8c33d89b000a'
   },
   {
     title: "考情说明条",
     corner: 0,
     icon: "../assets/images/kqsmt_icon.png",
+    instanceId: '018c24045d65094794178c23e986001e'
   },
   {
     title: "借款申请",
     corner: 0,
     icon: "../assets/images/jksq_icon.png",
+    instanceId: '018e36519fd70a0796ba8dd062c80830'
   },
 ];
 
@@ -83,15 +90,13 @@ const personMenus: MenuItem[] = [
 const toPageHandle = (path: string) => {
   window.location.href = path;
 };
-// dd.biz.util.openLink({
-// 				    url: "http://10.10.10.7:18080/business/Leave/mobileIndex?flowInstanceId=018f147231570a0767908f0ef011044f&activityInstanceId=018f147231750a0767908f0ef0110451&_fm=018c1f6407720947d2f88c1f64060001&participant=018f147231840a0767908f0ef0110453&userId=91507848-736f-4327-887e-22aec122d5c7&first=1&status=1&child=0",
-// 				    onSuccess:function(){
-// 	console.log("跳转成功")
-// },
-// 				    onFail: function(err){
-// 	console.error("跳转错误:"+err)
-// }
-// 				})
+const toProcessHandle = (item: ProcessMenuItem): void => {
+  reqest.get(`/TProcessEngine/addMobile?templateId=${item.instanceId}`).then((result: any) => { 
+    if (typeof(result) === 'string') {
+      location.href = result
+    }
+  })
+}
 </script>
 
 <template>
@@ -119,7 +124,7 @@ const toPageHandle = (path: string) => {
       <div class="card">
         <p class="card_title">常用流程</p>
         <ul>
-          <li v-for="(item, index) in processMenus" :key="index">
+          <li v-for="(item, index) in processMenus" :key="index" @click="toProcessHandle(item)">
             <span class="title">{{ item["title"] }}</span>
             <img :src="getAssetsURI(item['icon'])" />
           </li>

+ 2 - 1
zjugis-framework/zjugis-spring-boot-starter-workflow/src/main/java/com/zjugis/framework/workflow/utils/Constant.java

@@ -48,6 +48,7 @@ public class Constant {
 	}
 
 	public static String getUserId() {
-        return SecurityFrameworkUtils.getLoginUserId();
+	    return "dc794fe0-66fe-4b1d-9273-f747950b27c3";
+//        return SecurityFrameworkUtils.getLoginUserId();
 	}
 }