Browse Source

Merge remote-tracking branch 'origin/master'

jzh 9 tháng trước cách đây
mục cha
commit
661bf19d02

+ 1 - 1
client/src/views/OaSystem/personnelManagement/ygdaPage/index.ts

@@ -254,7 +254,7 @@ export const formConfigList = [
       },
       {
         name: 'xqcs',
-        title: '签次数'
+        title: '签次数'
       },
       {
         name: 'sl',

+ 6 - 1
client/src/views/OaSystem/personnelManagement/ygdaPage/index.vue

@@ -174,7 +174,12 @@ const deptOnChange = (id) => {
   queryParams.deptId = id
 }
 const exportHandle = async () => {
-  const result = await StaffRecordsApi.excelStaffRecord(queryParams)
+  const sendData = {
+    ...queryParams,
+    pageSize: total.value
+  }
+  console.log(queryParams)
+  const result = await StaffRecordsApi.excelStaffRecord(sendData)
   download.excel(result, '员工档案.xls')
 }
 /** 初始化 */

+ 9 - 8
client/src/views/OaSystem/projectCenter/projectTrack/index.vue

@@ -84,6 +84,11 @@
               {{ getDictLabel(DICT_TYPE.TRACKING_PROJECT_STATE, scope.row.zt) }}
             </template>
           </el-table-column>
+          <el-table-column prop="zt" label="所属板块" width="120">
+            <template #default="scope">
+              {{ getDictLabel(DICT_TYPE.PROJECT_SECTOR, scope.row.ssbk) }}
+            </template>
+          </el-table-column>
           <el-table-column prop="xzqmc" label="区域" width="160">
             <template #default="scope">
               {{ formatDistrict(scope.row.xzqmc)[0] }}
@@ -94,18 +99,14 @@
               {{ formatDistrict(scope.row.xzqmc)[1] }}
             </template>
           </el-table-column>
+          <el-table-column prop="gzry" label="跟踪人员" width="120" />
+          <el-table-column prop="jf" label="甲方单位" width="220" :show-overflow-tooltip="true" />
           <el-table-column
             :show-overflow-tooltip="true"
             prop="xmmc"
             label="项目名称"
             :min-width="320"
           />
-          <el-table-column prop="zt" label="所属板块" width="120">
-            <template #default="scope">
-              {{ getDictLabel(DICT_TYPE.PROJECT_SECTOR, scope.row.ssbk) }}
-            </template>
-          </el-table-column>
-          <el-table-column prop="gzry" label="跟踪人员" width="120" />
           <el-table-column prop="qyzj" label="区域总监" width="120" />
           <el-table-column prop="sfjc" label="是否进场" width="120">
             <template #default="scope">
@@ -122,7 +123,6 @@
               {{ (scope.row.zbje ?? 0).toFixed(2) }}
             </template>
           </el-table-column>
-          <el-table-column prop="jf" label="甲方单位" width="220" :show-overflow-tooltip="true" />
           <el-table-column prop="jfks" label="甲方科室" width="180" :show-overflow-tooltip="true" />
           <el-table-column
             prop="jfdjr"
@@ -422,7 +422,8 @@ const queryProjectTrackingSummary = async (): Promise<void> => {
     ...queryParams
   }
   const result = await request.get({ url: urlApi, params: sendData }, '/business')
-  infoList[0]['num'] = result ? result.amount ?? 0 : 0
+  const amount = result ? result.amount ?? 0 : 0
+  infoList[0]['num'] = amount / 10000
   infoList[1]['num'] = result ? result.nums ?? 0 : 0
 }
 queryProjectTrackingSummary()

+ 49 - 12
client_h5/src/components/flowForm.vue

@@ -72,12 +72,22 @@
       </template>
     </div>
     <div class="fixed-btn" v-if="isSubmitVisabled">
-      <!-- <van-button v-if="isCallbackActivity" round block type="primary" @click="submitHandle">
-          退回
-      </van-button> -->
-      <van-button :disabled="isSubmitDisabled" round block type="primary" @click="submitHandle">
-          转件
-      </van-button>
+      <div>
+        <van-button :disabled="isSubmitDisabled" round block type="primary" @click="submitHandle">
+            转件
+        </van-button>
+      </div>
+      <div v-if="isCallbackActivity">
+        <van-button round block type="warning" @click="calBackHandle">
+            退回
+        </van-button>
+      </div>
+    </div>
+    <div class="page-cover" v-if="calBackVisiabled">
+      <cal-back @close="calBackCloseHandle" :data="{
+      FLOWINSID: flowInstanceId,
+      ACTIVITYINSID: activityInstanceId,
+    }"/>
     </div>
   </div>
 </template>
@@ -90,6 +100,7 @@ import PubsubService from "@/utils/PubsubService";
 import { formatDate, jsonToFormData } from "@/utils/common";
 import { FlowDTO, getNextActivity } from "@/service/flow";
 import { getTemplateOpinionListByFlowInstanceId, getOpinionListByFlowInstanceId } from '@/service/flow';
+import calBack from "@/pages/handleCenter/calBack.vue";
 
 defineOptions({
   name: 'FlowForm'
@@ -107,24 +118,25 @@ async function initSimpleUserMap() {
 }
 initSimpleUserMap()
 
-const props = defineProps<{
-  data: any
-}>();
 const emit = defineEmits<{
   (e: 'submit', payload?: any):void
 }>()
 const route = useRoute();
 const currentActive = ref<string>('基础信息')
-const { flowInstanceId, activityInstanceId, participant, _o, _top } = route.query as {
+const { flowInstanceId, activityInstanceId, participant, _o, _top, _isCalBack } = route.query as {
   flowInstanceId: string
   activityInstanceId: string
   participant: string
   _o: string
-  _top: string
+  _top: string,
+  _isCalBack: string
 }
 if (_o && _o == 'v') {
   isSubmitVisabled.value = false
 }
+if (_isCalBack && _isCalBack === '1') {
+  isCallbackActivity.value = true
+}
 const currentOpinion = ref({
   id: '',
   opinionContent: '',
@@ -225,6 +237,16 @@ const submitHandle = async (): Promise<any> => {
     return result;
   });
 }
+const calBackVisiabled = ref<boolean>(false)
+const calBackCloseHandle = (bool: boolean) => {
+  calBackVisiabled.value = false
+  if (bool) {
+    router.replace('/handleCenter')
+  }
+}
+const calBackHandle = () => {
+  calBackVisiabled.value = true
+}
 </script>
 
 <style scoped lang="scss">
@@ -239,7 +261,13 @@ const submitHandle = async (): Promise<any> => {
     overflow-y: scroll;
   }
   >.fixed-btn {
-    padding: 10px 20px;
+    padding: 10px 10px;
+    display: flex;
+    flex-direction: row;
+    >div {
+      flex: 1;
+      margin: 0px 5px;
+    }
   }
   .flowOpinionBox {
     margin: 10px;
@@ -293,5 +321,14 @@ const submitHandle = async (): Promise<any> => {
       }
     }
   }
+  .page-cover {
+    position: absolute;
+    left: 0px;
+    right: 0px;
+    top: 0px;
+    bottom: 0px;
+    margin: auto;
+    z-index: 999;
+  }
 }
 </style>

+ 236 - 0
client_h5/src/pages/handleCenter/calBack.vue

@@ -0,0 +1,236 @@
+
+<template>
+  <div class="calBack_box">
+    <div class="card">
+      <h4>{{callbackTitle}}</h4>
+      <ul class="callback_process">
+        <li
+          v-for="(item, index) in callbacks"
+          :key="index"
+          :class="{ active: backActivityIndex === index }"
+          @click="selectCActivityHandle(item, index)"
+        >
+          <el-icon style="margin-right: 2px">
+            <DArrowRight />
+          </el-icon>
+          <span>{{ item['name'] }}</span>
+        </li>
+      </ul>
+    </div>
+    <div class="card">
+      <h4>退回原因</h4>
+      <van-form required="auto" class="form">
+        <van-field
+          v-model="callbackForm.callbackRemark"
+          name=""
+          label=""
+          placeholder="请填写退回原因"
+          type="textarea"
+          rows="5"
+          autosize
+        />
+      </van-form>
+    </div>
+    <div class="fixed-btn">
+      <div>
+        <van-button round block type="primary" @click="toBackHandle">
+            取消
+        </van-button>
+      </div>
+      <div>
+        <van-button round block type="warning" @click="callbackSumbit">
+            退回
+        </van-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { showDialog, closeDialog } from 'vant';
+import { CallbackFormType, getCalBackActivityNew, checkReturnMethod, callbackActivitySure } from '@/service/flow';
+
+defineOptions({
+  name: 'CalBack'
+})
+const props = defineProps<{
+  data: {
+    FLOWINSID: string
+    ACTIVITYINSID: string
+  }
+}>();
+const emit = defineEmits<{
+  (e: 'close', payload?: any):void
+}>();
+const backActivityIndex = ref<number>(0)
+const selectCActivityHandle = (item, index) => {
+  backActivityIndex.value = index
+}
+const toBackHandle = () => {
+  emit('close')
+}
+/**
+ * 退回
+ */
+const callbackTitle = ref<string>('退回至当前流程环节')
+const callbacks = ref<any[]>([])
+const callbackForm = reactive<CallbackFormType>({
+  flowInsId: '',
+  currentActInsId: '',
+  currentActTempId: '',
+  participantId: '',
+  position: '',
+  callbackRemark: '',
+  iBranchReturn: ''
+})
+const initCallbackFormData = (item: any) => {
+  callbackForm.flowInsId = item['flowInstanceId']
+  callbackForm.currentActInsId = item['currentActInsId']
+  callbackForm.currentActTempId = item['currentActTempId']
+  callbackForm.participantId = ''
+  callbackForm.position = ''
+  callbackForm.callbackRemark = ''
+}
+const callbackActivity = (item: any) => {
+  getCalBackActivityNew({
+    activityInstanceId: item['ACTIVITYINSID'],
+    flowInsId: item['FLOWINSID']
+  }).then((result: any) => {
+    initCallbackFormData(result)
+    if (result.callbackParentNode.length > 0) {
+      callbackTitle.value = '退回至父流程环节'
+      callbacks.value = result.callbackParentNode
+    } else if (result.callbackNode.length > 0) {
+      callbackTitle.value = '退回至当前流程环节'
+      callbacks.value = result.callbackNode
+    }
+  })
+}
+console.log("props------------------")
+console.log(props.data)
+callbackActivity(props.data);
+//提交退回
+const callbackSumbit = () => {
+  const item = callbacks.value[backActivityIndex.value]
+  const backToActivitys = [
+    {
+      callbackActTempId: item['activityTemplateId'],
+      callbackActInsId: item['id']
+    }
+  ]
+  checkReturnMethod({
+    paramMap: JSON.stringify(callbackForm),
+    backToActivitys: JSON.stringify(backToActivitys)
+  }).then((res: any) => {
+    if (res && !res.msg) {
+      callbackForm['iBranchReturn'] = res.isReturnAllSameLevelNode ? 'false' : 'true'
+      if (
+        res.isReturnAllSameLevelNode ||
+        res.isChildToParent == 1 ||
+        res.isBackToChild == 1 ||
+        res.isHaveChild == 1
+      ) {
+        let confirmTip = '此退件将退回所有同级办理环节,是否确认退件?'
+        if (res.isChildToParent == 1) {
+          confirmTip = '此退件将退回至父流程,是否确认退件?'
+        } else if (res.isBackToChild == 1) {
+          confirmTip = '此退件将退回至子流程,是否确认退件?'
+        } else if (res.isHaveChild == 1) {
+          confirmTip = '此退件包含子流程退回,是否确认退件?'
+        } else if (res.isSameReturn == 1) {
+          confirmTip = '是否确认同级退件?'
+        }
+        showDialog({
+          message: confirmTip,
+          showCancelButton: true,
+          confirmButtonText: '退回',
+          beforeClose: function(action: string) {
+            closeDialog()
+            if (action === 'confirm') {
+              callbackActivitySure({
+                paramMap: JSON.stringify(callbackForm),
+                backToActivitys: JSON.stringify(backToActivitys)
+              }).then((res: any) => {
+                if (res) {
+                  emit('close', true)
+                }
+              })
+            }
+          },
+        })
+      } else {
+        callbackActivitySure({
+          paramMap: JSON.stringify(callbackForm),
+          backToActivitys: JSON.stringify(backToActivitys)
+        }).then((res: any) => {
+          if (res) {
+            emit('close', true)
+          }
+        })
+      }
+    }
+  })
+}
+</script>
+
+<style lang="scss" scoped>
+.calBack_box {
+  background-color: #f7f8fa;
+  padding: 10px;
+  height: 100%;
+  box-sizing: border-box;
+  >.card {
+    background: #fff;
+    padding: 10px;
+    margin-bottom: 10px;
+    border-radius: 5px;
+    >h4 {
+      font-size: 17px;
+      padding: 5px 0px;
+      margin: 0px;
+      color: #333;
+    }
+    >.form {
+      border-radius: 3px;
+      border: 1px solid #eff1f5 !important;
+      :deep(.van-field__control) {
+        text-align: left;
+      }
+    }
+    >.callback_process {
+      font-size: 16px;
+      display: grid;
+      grid-template-columns: repeat(3, 1fr);
+      grid-gap: 10px;
+      >li {
+        align-items: center;
+        border: 1px solid #409eff;
+        color: #409eff;
+        padding: 5px 12px;
+        text-align: center;
+        font-size: 14px;
+        border-radius: 4px;
+        cursor: pointer;
+        &.active {
+        background-color: #409eff;
+        color: #fff;
+        }
+      }
+    }
+  }
+  >.fixed-btn {
+    padding: 10px 10px;
+    display: flex;
+    flex-direction: row;
+    position: fixed;
+    left: 0px;
+    right: 0px;
+    bottom: 0px;
+    margin: auto;
+    >div {
+      flex: 1;
+      margin: 0px 5px;
+    }
+  }
+}
+</style>

+ 25 - 4
client_h5/src/pages/handleCenter/index.vue

@@ -101,7 +101,7 @@
 <script setup lang="ts">
 import { getHandlerCaseCenterList, getHandlerCaseCenterCount, getFlowTemplateTreeDataByUser, saveAndGetMobileUrl } from '@/service/flow';
 import { listToTree } from '@/utils/tree';
-import { formatDateTime } from '@/utils/common';
+import { formatDateTime, getQueryParamsByUrl } from '@/utils/common';
 
 defineOptions({
   name: 'HandleCenter'
@@ -236,16 +236,25 @@ const confirmHandle = () => {
  * 流程办理或查看
  */
 const router = useRouter();
-const toPageHandle = (path: string) => {
+const toPageHandle = (path: string, params: any) => {
   if (path) {
     //@ts-ignore
     const arr = path.split(window?.locationBaseUrl)
     if (arr.length > 1) {
-      router.push(arr[1])
+      const {url, query} = getQueryParamsByUrl(arr[1])
+      Object.assign(query, params);
+      router.push({
+        path: url,
+        query
+      })
     }
   }
 };
 const clickHandler = (item: any, isView: boolean) => {
+  let btnArrJson: any[] = []
+  if (item && item['btnArrJson']) {
+    btnArrJson = JSON.parse(item['btnArrJson'])
+  }
   const sendData = {
     "activityInsId": item['ACTIVITYINSID'],
     "flowInsId": item['FLOWINSID'],
@@ -255,10 +264,22 @@ const clickHandler = (item: any, isView: boolean) => {
   }
   saveAndGetMobileUrl(sendData).then((result) => { 
     if (typeof(result) === 'string') {
-      toPageHandle(result)
+      toPageHandle(result, {
+        '_isCalBack': filterToCalBackBtn(btnArrJson)
+      })
     }
   });
 }
+const filterToCalBackBtn = (lists: any[]): string => {
+  let isCalBack: string = '0'; 
+  for (let i: number = 0; i < lists.length; i++){
+    if (lists[i]['name'] === "calBackBtn") {
+      isCalBack = lists[i]['iEnable'] ? '1' : '0'
+      break;
+    }
+  }
+  return isCalBack;
+}
 </script>
 
 <style lang="scss" scoped>

+ 0 - 1
client_h5/src/router/getUserInfo.ts

@@ -7,7 +7,6 @@ import { useDictStoreWithOut } from "@/utils/dict";
 const USERINFO_KEY: string = '_userInfo';
 const TOKEN_KEY: string = 'ACCESS_TOKEN';
 const EXPIRES_TIME_KEY: string = 'EXPIRES_TIME_KEY';
-
 export const initUserInfoHandler = async (isStore: boolean = false) => {
   const userStore = useUserStoreWithOut();
   if (isStore) {

+ 8 - 0
client_h5/src/router/routes.ts

@@ -21,6 +21,14 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import("@/pages/handleCenter/index.vue"),
       },
+      {
+        path: "calBack",
+        name: "CalBack",
+        meta: {
+          title: "办件中心",
+        },
+        component: () => import("@/pages/handleCenter/calBack.vue"),
+      },
       {
         path: "notice",
         name: "Notice",

+ 51 - 0
client_h5/src/service/flow.ts

@@ -8,6 +8,15 @@ export interface FlowDTO {
 export interface FlowCreateDTO {
   templateId: string
 }
+export type CallbackFormType = {
+  flowInsId: string
+  currentActInsId: string
+  currentActTempId: string
+  participantId: string
+  position: string
+  callbackRemark: string
+  iBranchReturn?: string
+}
 /** 获取办件中心列表 */
 export const getHandlerCaseCenterList = async (data: any) => {
   return await request.post(`/workflow/HandlerCaseCenter/list`, data, {
@@ -68,4 +77,46 @@ export const getOpinionListByFlowInstanceId = async (flowInstanceId: String) =>
 /** 获取流程模板意见 */
 export const getTemplateOpinionListByFlowInstanceId = async (flowInstanceId: String) => {
   return await request.get(`/workflow/TFlowOpinion/getOpinionListByFlowInstanceId?flowInstanceId=${flowInstanceId}`);
+}
+
+//获取退回所在流程信息
+export const getCalBackActivityNew = async (data: {
+  activityInstanceId: string
+  flowInsId: string
+}) => {
+  return await request.post('/workflow/HandlerCaseCenter/getCalBackActivityNew',data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  })
+}
+
+//检查退件
+export const checkReturnMethod = async (data: {
+  paramMap: CallbackFormType | string
+  backToActivitys: {
+    callbackActTempId: string
+    callbackActInsId: string
+  }[] | string
+}) => {
+  return await request.post('/workflow/HandlerCaseCenter/checkReturnMethod', data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  })
+}
+
+//发起退回操作
+export const callbackActivitySure = async (data: {
+  paramMap: CallbackFormType | string
+  backToActivitys: {
+    callbackActTempId: string
+    callbackActInsId: string
+  }[] | string
+}) => {
+  return await request.post('/workflow/HandlerCaseCenter/callbackActivity', data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  })
 }

+ 30 - 0
client_h5/src/utils/common.ts

@@ -107,4 +107,34 @@ export const setStoreObject = (lKey: string, data: any) => {
     localStorage.setItem(lKey, data);
     return;
   }
+}
+export type URLParamType = {
+  url: string
+  query: {
+      [key:string]: string
+    }
+  }
+
+export const getQueryParamsByUrl = (str: string): URLParamType => {
+  const arr: string[] = str.split("?")
+  const queryMap: URLParamType = {
+    url: '',
+    query: {}
+  }
+  if (arr.length > 1) {
+    const query: {
+      [key: string]: string
+    } = {}
+    const queryStr: string = arr[1]
+    var arr1: string[] = queryStr.split('&')
+    arr1.forEach(str=>{
+        const arr2: string[] = str.split("=")
+        if(arr2.length > 1){
+            query[arr2[0]] = arr2[1]
+        }
+    })
+    queryMap['query'] = query
+  }
+  queryMap['url'] = arr[0]
+  return queryMap
 }