瀏覽代碼

办件中心作废功能开发

songxy 8 月之前
父節點
當前提交
2c3a451cea

+ 1 - 1
client/src/utils/formRequiredValidate.ts

@@ -30,7 +30,7 @@ export class FormRequiredValidate {
         const name = rules[i]['name']
         console.log(name)
         if (
-          Object.hasOwn(form, name) &&
+          form.hasOwnProperty(name) &&
           this.ruleMap[name]['required'] &&
           !this.isNotBlank(form[name])
         ) {

+ 0 - 285
client_h5/src/components/flowForm copy.vue

@@ -1,285 +0,0 @@
-<template>
-  <div class="flow_form_box">
-    <div class="flow_container">
-      <template v-if="isShowTab">
-        <van-tabs v-model:active="currentActive" :sticky="true">
-          <van-tab title="基础信息">
-            <slot></slot>
-          </van-tab>
-          <van-tab title="审批意见">
-            <div class="flowOpinionBox">
-              <template v-if="templateOpinion.length > 0">
-                <div v-for="(item,index) in templateOpinion" :key="index" :class="{'flowOpinionItem': true, 'disabled': !item['isEditor']}">
-                  <h4>{{ item['opinionName'] }}</h4>
-                  <div class="content">
-                    <template v-if="item['isEditor']">
-                      <van-field
-                      v-model="currentOpinion.opinionContent"
-                      rows="3"
-                      autosize
-                      label=""
-                      type="textarea"
-                      maxlength="50"
-                      placeholder="请输入留言"
-                    />
-                  </template>
-                  <template v-else>
-                      <van-field
-                      v-model="item.opinionContent"
-                      rows="3"
-                      autosize
-                      label=""
-                      type="textarea"
-                      :disabled="true"
-                      maxlength="50"
-                      placeholder="请输入留言"
-                    />
-                  </template>
-                  </div>
-                  <div class="footer">
-                    <p>
-                      <span>办理人:</span>
-                      <span v-if="item['isEditor']">
-                        <template v-if="currentOpinion['sign'] && currentOpinion['sign'].indexOf('http') !== -1">
-                          <img class="signImg" :src="currentOpinion['sign']" />
-                        </template>
-                        <template v-else>
-                          {{ currentOpinion['sign'] }}
-                        </template>
-                      </span>
-                      <span v-else>
-                        <template v-if="item['sign'] && item['sign'].indexOf('http') !== -1">
-                          <img class="signImg" :src="item['sign']" />
-                        </template>
-                        <template v-else>
-                          {{ item['sign'] }}
-                        </template>
-                      </span>
-                    </p>
-                    <p>
-                      <span>办理时间:</span>
-                      <span>{{ item['isEditor'] ? currentOpinion['opinionTime'] : item['opinionTime']}}</span>
-                    </p>
-                  </div>
-                </div>
-              </template>
-            </div>
-          </van-tab>
-        </van-tabs>
-      </template>
-      <template v-else>
-        <slot></slot>
-      </template>
-    </div>
-    <div class="fixed-btn" v-if="isSubmitVisabled">
-      <van-button :disabled="isSubmitDisabled" round block type="primary" @click="submitHandle">
-          转件
-      </van-button>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-import { showNotify } from 'vant';
-import { closePage } from 'dingtalk-jsapi';
-import { formatDate, jsonToFormData } from "@/utils/common";
-import { FlowDTO, getNextActivity } from "@/service/flow";
-import { getTemplateOpinionListByFlowInstanceId, getOpinionListByFlowInstanceId } from '@/service/flow';
-
-defineOptions({
-  name: 'FlowForm'
-})
-const isSubmitVisabled = ref<boolean>(true)
-const isSubmitDisabled = ref<boolean>(false)
-const userInfo = JSON.parse(localStorage.getItem('_userInfo') as string);
-const userId: string = userInfo ? userInfo['id'] ?? '' : ''
-const signatureUrl: string = userInfo ? userInfo['signatureUrl'] ?? '' : ''
-const currentUserName: string = userInfo ? userInfo['nickname'] ?? '' : ''
-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 {
-  flowInstanceId: string
-  activityInstanceId: string
-  participant: string
-  _o: string
-  _top: string
-}
-if (_o && _o == 'v') {
-  isSubmitVisabled.value = false
-}
-const currentOpinion = ref({
-  id: '',
-  opinionContent: '',
-  opinionTime: '',
-  sign: ''
-})
-const isShowTab = ref<boolean>(true)
-const templateOpinion = ref<any[]>([])  //用来缓存展示节点
-getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
-  let tList = tResult.data ?? []
-  getOpinionListByFlowInstanceId(flowInstanceId).then((oResult) => {
-    const oList = oResult.data ?? []
-    if(oList.length === 0){
-      isShowTab.value = false;
-    }
-    if (oList.length > 0) { 
-      for (let i = 0; i < tList.length; i++) { 
-        const tItem = tList[i];
-        if (tItem['iDisplayOpinion'] === 0) {
-          tList.splice(i, 1)
-          i--;
-          continue;
-        }
-        tItem['opinions'] = []
-        for (let j = 0; j < oList.length; j++) { 
-          const oItem = oList[j]
-          if (oItem['status'] == '40') {
-            oList.splice(j, 1);
-            j--;
-            continue;
-          }
-          if (tItem['id'] === oItem['flowOpinionId']) {
-            if (_o !== 'v' && oItem['activityInstanceId'] === activityInstanceId && oItem['participantId'] === participant) {
-              oItem['isEditor'] = true;
-              currentOpinion.value.id = oItem['id']
-              currentOpinion.value.opinionContent = oItem['opinionContent'] ?? '同意'
-              currentOpinion.value.opinionTime = formatDate(new Date())
-              currentOpinion.value.sign = signatureUrl ? signatureUrl : currentUserName;
-            }
-            oItem['opinionTime'] = oItem['opinionTime'] ? formatDate(new Date(oItem['opinionTime'])) : ''
-            if (tItem['iHideNonFilledComment'] == 1 && !oItem['opinionContent'] && oItem['activityInstanceId'] !== activityInstanceId) continue;
-            templateOpinion.value.push({
-              opinionName: tItem['opinionName'],
-              opinionUserText: tItem['opinionUserText'],
-              opinionTimeText: tItem['opinionTimeText'],
-              ...oItem
-            })
-            continue
-          } 
-        }
-      }
-    }
-  })
-})
-
-const activityData: FlowDTO = {
-  activityInstanceId,
-  participantId: participant,
-  flowOpinion: "",
-};
-const router = useRouter();
-const submitHandle = async (): Promise<any> => {
-  emit('submit', async () => {
-    isSubmitDisabled.value = true;
-    //工作流转件
-    activityData.activityInstanceId = activityInstanceId;
-    activityData.participantId = participant;
-    activityData.flowOpinion = JSON.stringify(currentOpinion.value);
-    const result = await getNextActivity(jsonToFormData(activityData) as FormData);
-    if (result) {
-      //@ts-ignore
-      if (result.error_code) {
-        showNotify({
-          type: 'danger',
-          //@ts-ignore
-          message: result.msg,
-          position: 'top',
-          onClose() {
-            isSubmitDisabled.value = false;
-          }
-        });
-      } else {
-        showNotify({
-          type: 'primary',
-          message: '转件成功',
-          position: 'top',
-          onClose() {
-            isSubmitDisabled.value = false;
-            if (_top == '1') {
-              closePage({})
-            } else {
-              router.back();
-            }
-          }
-        });
-      }
-    }
-    return result;
-  });
-}
-</script>
-
-<style scoped lang="scss">
-.flow_form_box {
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  background-color: #f7f8fa;
-  >.flow_container {
-    flex-grow: 1;
-    height: 0px;
-    overflow-y: scroll;
-  }
-  >.fixed-btn {
-    padding: 10px 20px;
-  }
-  .flowOpinionBox {
-    margin: 10px;
-    >.flowOpinionItem {
-      margin-bottom: 15px;
-      background-color: #fff;
-      padding: 10px 0px;
-      &.disabled {
-        >h4 {
-          color: #999;
-        }
-        
-        >.footer {
-          > p {
-            color: #999;
-          }
-        }
-      }
-      >h4 {
-        font-size: 17px;
-        margin: 0px;
-        padding: 0px 16px;
-      }
-      >.content {
-        :deep(.van-field__value) {
-          border: 1px solid #ececec;
-          border-radius: 5px;
-          padding: 10px
-        }
-      }
-      >.footer {
-        display: flex;
-        align-items: center;
-        padding: 0px 16px;
-        >p {
-          margin: 0px;
-          flex: 1;
-          white-space: nowrap;
-          color: #333;
-          >span {
-            display: inline-block;
-            &:first-child {
-              margin-right: 5px;
-            }
-          }
-          .signImg {
-            height: 30px;
-            vertical-align: middle;
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 66 - 20
client_h5/src/components/flowForm.vue

@@ -72,23 +72,36 @@
       </template>
     </div>
     <div class="fixed-btn" v-if="isSubmitVisabled">
-      <div v-if="isCallbackActivity">
-        <van-button round block type="warning" @click="calBackHandle">
-            退回
-        </van-button>
+      <div class="one">
+        <div v-if="isObsoleteActivity">
+          <van-button round block type="warning" @click="operationHandle('obsolete')">
+              作废
+          </van-button>
+        </div>
+        <div v-if="isCallbackActivity">
+          <van-button round block type="success" @click="operationHandle('calback')">
+              退回
+          </van-button>
+        </div>
       </div>
-      <div>
+      <div class="two">
         <van-button :disabled="isSubmitDisabled" round block type="primary" @click="submitHandle">
             转件
         </van-button>
       </div>
     </div>
-    <div class="page-cover" v-if="calBackVisiabled">
+    <div class="page-cover" v-if="visiabledType === 'calback'">
       <cal-back @close="calBackCloseHandle" :data="{
       FLOWINSID: flowInstanceId,
       ACTIVITYINSID: activityInstanceId,
     }"/>
     </div>
+    <div class="page-cover" v-if="visiabledType === 'obsolete'">
+      <obsolete @close="calBackCloseHandle" ref="obsoleteRef" :data="{
+      FLOWINSID: flowInstanceId,
+      ACTIVITYINSID: activityInstanceId,
+    }"/>
+    </div>
   </div>
 </template>
 
@@ -99,13 +112,15 @@ import { getSimpleUserMap } from '@/service/user'
 import PubsubService from "@/utils/PubsubService";
 import { formatDate, jsonToFormData } from "@/utils/common";
 import { FlowDTO, getNextActivity } from "@/service/flow";
-import { getTemplateOpinionListByFlowInstanceId, getOpinionListByFlowInstanceId, getBtnHtml } from '@/service/flow';
+import { isFlowVoid, getTemplateOpinionListByFlowInstanceId, getOpinionListByFlowInstanceId, getBtnHtml } from '@/service/flow';
 import calBack from "@/pages/handleCenter/calBack.vue";
+import obsolete from "@/pages/handleCenter/obsolete.vue";
 
 defineOptions({
   name: 'FlowForm'
 })
 const isCallbackActivity = ref<boolean>(false)
+const isObsoleteActivity = ref<boolean>(false)
 const isSubmitVisabled = ref<boolean>(true)
 const isSubmitDisabled = ref<boolean>(false)
 const userInfo = JSON.parse(localStorage.getItem('_userInfo') as string);
@@ -123,25 +138,30 @@ const emit = defineEmits<{
 }>()
 const route = useRoute();
 const currentActive = ref<string>('基础信息')
-const { flowInstanceId, activityInstanceId, participant, _o, _top, _isCalBack } = route.query as {
+const { flowInstanceId, activityInstanceId, participant, _o, _top, _isCalBack, _isObsolete } = route.query as {
   flowInstanceId: string
   activityInstanceId: string
   participant: string
   _o: string
   _top: string,
   _isCalBack: string
+  _isObsolete: string
 }
 if (_o && _o == 'v') {
   isSubmitVisabled.value = false
 }
-if (_isCalBack && _isCalBack === '1') {
-  isCallbackActivity.value = true
-} else {
+if (!_isCalBack) {
   getBtnHtml(flowInstanceId, activityInstanceId, userInfo.id).then(result => {
     if (result && result.indexOf('退回') !== -1) {
       isCallbackActivity.value = true
     }
+    if (result && result.indexOf('作废') !== -1) {
+      isObsoleteActivity.value = true
+    }
   })
+} else {
+    isCallbackActivity.value = (_isCalBack && _isCalBack === '1') as boolean
+    isObsoleteActivity.value = (_isObsolete && _isObsolete === '1') as boolean
 }
 const currentOpinion = ref({
   id: '',
@@ -243,16 +263,35 @@ const submitHandle = async (): Promise<any> => {
     return result;
   });
 }
-const calBackVisiabled = ref<boolean>(false)
+const obsoleteRef = ref()
+const visiabledType = ref<string>('')
 const calBackCloseHandle = (bool: boolean) => {
-  calBackVisiabled.value = false
+  visiabledType.value = ''
   if (bool) {
-    router.replace('/handleCenter')
+    router.replace({
+      path: '/handleCenter'
+    })
+    PubsubService.publish('HandleCenterEvent')
   }
 }
-const calBackHandle = () => {
-  calBackVisiabled.value = true
+const operationHandle = (type: string) => {
+  if (type === 'obsolete') {
+    isFlowVoid({
+      flowInstanceId: flowInstanceId
+    }).then((result: any) => {
+      if (result === 'ok') {
+        visiabledType.value = type
+        const timer = setTimeout(() => {
+          obsoleteRef.value.initObsolete()
+          clearTimeout(timer)
+        }, 500)
+      }
+    })
+    return;
+  }
+  visiabledType.value = type
 }
+
 </script>
 
 <style scoped lang="scss">
@@ -268,11 +307,18 @@ const calBackHandle = () => {
   }
   >.fixed-btn {
     padding: 10px 10px;
-    display: flex;
-    flex-direction: row;
-    >div {
-      flex: 1;
+    >.one {
+      display: flex;
+      flex-direction: row;
+      >div {
+        display: inline-block;
+        flex: 1;
+        margin: 0px 5px;
+      }
+    }
+    >.two {
       margin: 0px 5px;
+      margin-top: 10px;
     }
   }
   .flowOpinionBox {

+ 2 - 1
client_h5/src/pages/handleCenter/calBack.vue

@@ -198,8 +198,9 @@ const callbackSumbit = () => {
     >.callback_process {
       font-size: 16px;
       display: grid;
-      grid-template-columns: repeat(3, 1fr);
+      grid-template-columns: repeat(2, 1fr);
       grid-gap: 10px;
+      white-space: nowrap;
       >li {
         align-items: center;
         border: 1px solid #409eff;

+ 33 - 7
client_h5/src/pages/handleCenter/index.vue

@@ -136,7 +136,9 @@
 <script setup lang="ts">
 import { getHandlerCaseCenterList, getHandlerCaseCenterCount, getFlowTemplateTreeDataByUser, saveAndGetMobileUrl } from '@/service/flow';
 import { listToTree } from '@/utils/tree';
+import PubsubService from "@/utils/PubsubService";
 import { formatDateTime, getQueryParamsByUrl } from '@/utils/common';
+import { useCommonStoreWithOut } from '@/stores/modules/common';
 
 defineOptions({
   name: 'HandleCenter'
@@ -273,6 +275,7 @@ const confirmHandle = () => {
 /**
  * 流程办理或查看
  */
+const CommonStore = useCommonStoreWithOut();
 const router = useRouter();
 const toPageHandle = (path: string, params: any) => {
   if (path) {
@@ -300,24 +303,47 @@ const clickHandler = (item: any, isView: boolean) => {
     "isView": isView,
     "status": ''
   }
+  CommonStore.setCFlowItemData({
+    FLOWINSID: item['FLOWINSID'],
+    CODE: item['CODE'],
+    DESCRIBTION: item['DESCRIBTION'],
+    ACTIVITYNAME:  item['ACTIVITYINSID']
+  })
+  const operationMap = filterToCalBackBtn(btnArrJson);
   saveAndGetMobileUrl(sendData).then((result) => { 
-    if (typeof(result) === 'string') {
+    if (typeof (result) === 'string') {
       toPageHandle(result, {
-        '_isCalBack': filterToCalBackBtn(btnArrJson)
+        '_isCalBack': operationMap['isCalback'],
+        '_isObsolete': operationMap['isObsolete']
       })
     }
   });
 }
-const filterToCalBackBtn = (lists: any[]): string => {
-  let isCalBack: string = '0'; 
+type OperationType = {
+  isCalback: string
+  isObsolete: string
+}
+const filterToCalBackBtn = (lists: any[]): OperationType => {
+  const map: OperationType = {
+    isCalback: '0',
+    isObsolete: '0'
+  }
   for (let i: number = 0; i < lists.length; i++){
     if (lists[i]['name'] === "calBackBtn") {
-      isCalBack = lists[i]['iEnable'] ? '1' : '0'
-      break;
+      map['isCalback'] = lists[i]['iEnable'] ? '1' : '0'
+      continue;
+    }
+    if (lists[i]['name'] === "obsoleteBtn") {
+      map['isObsolete'] = lists[i]['iEnable'] ? '1' : '0'
+      continue;
     }
   }
-  return isCalBack;
+  return map;
 }
+
+PubsubService.subscribe('HandleCenterEvent', () => {
+    searchHandler();
+})
 </script>
 
 <style lang="scss" scoped>

+ 192 - 0
client_h5/src/pages/handleCenter/obsolete.vue

@@ -0,0 +1,192 @@
+
+<template>
+  <div class="calBack_box">
+    <div class="card">
+      <h4>申请人</h4>
+      <van-form required="auto" class="form">
+        <van-field
+          v-model="inullyApplyForm.nickname"
+          disabled
+        />
+      </van-form>
+    </div>
+    <div class="card">
+      <h4>申请时间</h4>
+      <van-form required="auto" class="form">
+        <van-field
+          v-model="inullyApplyForm.nullyApplyTime"
+          disabled
+        />
+      </van-form>
+    </div>
+    <div class="card">
+      <h4>作废原因</h4>
+      <van-form required="auto" class="form">
+        <van-field
+          v-model="inullyApplyForm.nullyReason"
+          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="nullyApplySubmit">
+            提交
+        </van-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { showNotify } from "vant";
+import { getCurrentDate, generateUUID } from '@/utils/common';
+import { InullyApplyFormType, saveINullyApply } from '@/service/flow';
+import { useCommonStoreWithOut } from '@/stores/modules/common';
+
+defineOptions({
+  name: 'Obsolete'
+})
+const emit = defineEmits<{
+  (e: 'close', payload?: any):void
+}>();
+const toBackHandle = () => {
+  emit('close')
+}
+/**
+ * 作废业务逻辑
+ * 包含作废、恢复、彻底作废
+ */
+enum InullyApplyEnum {
+  Nully, //作废
+  Recover, //恢复
+  Nullify //彻底作废
+}
+export type InullyApplyEnumType = InullyApplyEnum
+export type InullyApplyOptionType = {
+  success?: (type: InullyApplyEnum) => void
+}
+const inullyApplyForm = reactive<InullyApplyFormType>({
+  id: '',
+  nullyApplyUserId: '',
+  flowInstanceId: '',
+  voidFlowInstanceId: '',
+  iNullied: '',
+  voidFlowCode: '',
+  voidFlowDesc: '',
+  voidFlowName: '',
+  nullyApplyTime: '',
+  nullyReason: ''
+})
+const initInullyApplyFormData = (row: any, iNullied: string = '10', id: string = '') => {
+  const userInfo = JSON.parse(localStorage.getItem('_userInfo') as string);
+  inullyApplyForm.id = id ?? ''
+  inullyApplyForm.nullyApplyUserId = userInfo?.id ?? ''
+  inullyApplyForm.nickname = userInfo?.nickname
+  inullyApplyForm.nullyApplyTime = getCurrentDate()
+  inullyApplyForm.iNullied = iNullied
+  inullyApplyForm.flowInstanceId = generateUUID()
+  inullyApplyForm.voidFlowInstanceId = row?.FLOWINSID ?? ''
+  inullyApplyForm.voidFlowCode = row?.CODE ?? ''
+  inullyApplyForm.voidFlowDesc = row?.DESCRIBTION ?? ''
+  inullyApplyForm.voidFlowName = row?.ACTIVITYNAME ?? ''
+  inullyApplyForm.nullyReason = ''
+}
+const CommonStore = useCommonStoreWithOut()
+const cFlowData = CommonStore.getCFlowItem
+const initObsolete = () => {
+  initInullyApplyFormData(cFlowData)
+}
+const nullyApplySubmit = async () => {
+  return await saveINullyApply({
+    nullyApply: JSON.stringify(inullyApplyForm)
+  }).then((result: any) => {
+    if (result === 'ok') {
+      showNotify({
+        type: 'primary',
+        message: '作废成功!',
+        position: 'top',
+        onClose() {
+          emit('close', true)
+        }
+      });
+    }
+  })
+}
+defineExpose({
+  initObsolete
+})
+</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(2, 1fr);
+      grid-gap: 10px;
+      white-space: nowrap;
+      >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>

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

@@ -8,6 +8,19 @@ export interface FlowDTO {
 export interface FlowCreateDTO {
   templateId: string
 }
+export type InullyApplyFormType = {
+  id: string
+  nickname?: string
+  nullyApplyUserId: string
+  flowInstanceId: string
+  voidFlowInstanceId: string
+  iNullied: string
+  voidFlowCode: string
+  voidFlowDesc: string
+  voidFlowName: string
+  nullyApplyTime: string
+  nullyReason: string
+}
 export type CallbackFormType = {
   flowInsId: string
   currentActInsId: string
@@ -124,4 +137,43 @@ export const callbackActivitySure = async (data: {
       'Content-Type': 'application/x-www-form-urlencoded'
     }
   })
+}
+
+//效验该流程是否已经作废
+export const isFlowVoid = async (data: { flowInstanceId: string }) => {
+  return await request.post('/workflow/Transfer/isVoid', data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  })
+}
+
+//获取提交作废的参数
+export const getINullyApplyExample = async (data: {
+  voidFlowInstanceId: string
+  isRecover: number
+}) => {
+  return await request.post('/workflow/INullyApply/getExample', data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  })
+}
+
+//办件中心“作废”操作
+export const saveINullyApply = async (data: { nullyApply: InullyApplyFormType | string }) => {
+  return await request.post('/workflow/INullyApply/save', data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  })
+}
+
+//办件中心“彻底作废”操作
+export const completelyVoidINullyApply = async (data: { flowInstanceId: string }) => {
+  return await request.post('/workflow/INullyApply/completelyVoid', data, {
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    }
+  })
 }

+ 43 - 0
client_h5/src/stores/modules/common.ts

@@ -0,0 +1,43 @@
+import { defineStore } from "pinia";
+import { store } from '../index'
+
+type CFlowType = {
+  FLOWINSID: string
+  CODE: string
+  DESCRIBTION: string
+  ACTIVITYNAME: string
+}
+const CommonStore = defineStore('CommonStore', {
+  state() {
+    return {
+      cFlowItem: {
+        FLOWINSID: '',
+        CODE: '',
+        DESCRIBTION: '',
+        ACTIVITYNAME: ''
+      } as CFlowType
+    }
+  },
+  getters: {
+    getCFlowItem(): CFlowType {
+      return this.cFlowItem;
+    }
+  },
+  actions: {
+    setCFlowItemData(data: CFlowType) {
+      this.cFlowItem = data;
+    },
+    clearCFlowItemData() {
+      this.cFlowItem = {
+        FLOWINSID: '',
+        CODE: '',
+        DESCRIBTION: '',
+        ACTIVITYNAME: ''
+      } as CFlowType
+    }
+  }
+})
+
+export const useCommonStoreWithOut = () => {
+  return CommonStore(store);
+}

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

@@ -137,4 +137,55 @@ export const getQueryParamsByUrl = (str: string): URLParamType => {
   }
   queryMap['url'] = arr[0]
   return queryMap
+}
+
+/**
+ * 生成UUID
+ */
+export const generateUUID = () => {
+  if (typeof crypto === 'object') {
+    if (typeof crypto.randomUUID === 'function') {
+      return crypto.randomUUID()
+    }
+    if (typeof crypto.getRandomValues === 'function' && typeof Uint8Array === 'function') {
+      const callback = (c: any) => {
+        const num = Number(c)
+        return (num ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (num / 4)))).toString(
+          16
+        )
+      }
+      return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, callback)
+    }
+  }
+  let timestamp = new Date().getTime()
+  let performanceNow =
+    (typeof performance !== 'undefined' && performance.now && performance.now() * 1000) || 0
+  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
+    let random = Math.random() * 16
+    if (timestamp > 0) {
+      random = (timestamp + random) % 16 | 0
+      timestamp = Math.floor(timestamp / 16)
+    } else {
+      random = (performanceNow + random) % 16 | 0
+      performanceNow = Math.floor(performanceNow / 16)
+    }
+    return (c === 'x' ? random : (random & 0x3) | 0x8).toString(16)
+  })
+}
+
+/**
+ * 获取当前日期
+ */
+export const getCurrentDate = (isSecond: boolean = false) => {
+  const dateObj = new Date()
+  const year = dateObj.getFullYear()
+  const month = dateObj.getMonth() + 1
+  const day = dateObj.getDate()
+  if (!isSecond) return `${year}-${month > 9 ? month : '0' + month}-${day > 9 ? day : '0' + day}`
+  const hours = dateObj.getHours()
+  const min = dateObj.getMinutes()
+  const second = dateObj.getSeconds()
+  return `${year}-${month > 9 ? month : '0' + month}-${day > 9 ? day : '0' + day} ${
+    hours > 9 ? hours : '0' + hours
+  }:${min > 9 ? min : '0' + min}:${second > 9 ? second : '0' + second}`
 }