فهرست منبع

Merge remote-tracking branch 'origin/master'

yewc 1 سال پیش
والد
کامیت
7a6e1d6265

+ 33 - 0
client_h5/src/pages/officialSealUse/index.scss

@@ -0,0 +1,33 @@
+.van-cell-group {
+  margin: 0px;
+}
+.van-overlay {
+  background: rgba(0,0,0,0.3);
+}
+.add_btn {
+  background-color: #1989fa;
+  padding: 5px 10px;
+  border: 0px;
+  outline: none;
+  font-size: 13px;
+  color: #fff;
+  border-radius: 2px;
+}
+.detail-popup {
+  >.title {
+    font-size: 15px;
+    padding-left: 10px;
+  }
+  >.fixed-btn {
+    padding: 15px;
+  }
+}
+  :deep(.van-swipe-cell__right) {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    >button {
+      height: 50%;
+    }
+  }

+ 156 - 0
client_h5/src/pages/officialSealUse/index.vue

@@ -0,0 +1,156 @@
+<template>
+  <flow-form :data="formData" @submit="submitNextActivity">
+    <card title="基础信息" style="height: auto">
+      <van-form required="true" ref="form">
+        <van-cell-group inset>
+          <van-field
+              v-model="formData.userNickname"
+              name="申请人"
+              label="申请人"
+              placeholder="申请人"
+              readonly
+              :rules="[{ required: true, message: '未获取申请人' }]"
+          />
+          <van-field
+              v-model="formData.deptName"
+              name="所在部门"
+              label="所在部门"
+              placeholder="所在部门"
+              readonly
+              :rules="[{ required: true, message: '请填写所在部门' }]"
+          />
+          <van-field
+              v-model="formData.createTimeC"
+              name="申请时间"
+              label="申请时间"
+              placeholder="申请时间"
+              readonly
+              :rules="[{ required: true, message: '未获取申请时间' }]"
+          />
+          <van-field
+              v-model="formData.officialSealApplyNo"
+              name="申请单号"
+              label="申请单号"
+              placeholder="申请单号"
+              readonly
+              :rules="[{ required: true, message: '未获取申请单号' }]"
+          />
+
+          <van-field
+              v-model="formData.officialSealApplyReason"
+              name="申请事由"
+              label="申请事由"
+              placeholder="申请事由"
+              readonly
+              :rules="[{ required: true, message: '未获取申请事由' }]"
+          />
+          <van-field
+              v-model="formData.officialSealUseTypeText"
+              name="用章类型"
+              label="用章类型"
+              placeholder="用章类型"
+              readonly
+              :rules="[{ required: true, message: '未获取用章类型' }]"
+          />
+          <van-field
+              v-model="formData.officialSealNameText"
+              name="公章名称"
+              label="公章名称"
+              placeholder="公章名称"
+              readonly
+              :rules="[{ required: true, message: '未获取公章名称' }]"
+          />
+        </van-cell-group>
+      </van-form>
+    </card>
+  </flow-form>
+</template>
+
+<script setup lang="ts">
+import {useRoute} from 'vue-router';
+import {FlowDTO, getNextActivity} from '@/service/flow';
+import reqest from "@/utils/request";
+import DateTimeRange from '@/components/dateTimeRange.vue';
+import FlowForm from '@/components/flowForm.vue';
+import Card from '@/components/card.vue';
+import CardCell from '@/components/cardCell.vue';
+import {Checkbox, CheckboxGroup} from 'vant';
+import {DICT_TYPE, getDictLabel} from "@/utils/dict";
+
+
+const route = useRoute();
+const form = ref(null);
+
+interface FormDataType {
+}
+
+const formData = ref<FormDataType>({})
+
+const {activityInstanceId, participant, flowInstanceId, read} = route.query as {
+  activityInstanceId: string;
+  participant: string;
+  flowInstanceId: string;
+  read: string;
+};
+const activityData: FlowDTO = {
+  activityInstanceId,
+  participantId: participant,
+  flowOpinion: ''
+}
+const submitNextActivity = async (NextActivity: () => Promise<any>) => {
+  NextActivity();
+};
+
+const jsonToFormData = (json: any): FormData | null => {
+  const keys: string[] = Object.keys(json)
+  if (keys.length > 0) {
+    const formData = new FormData();
+    keys.forEach((key) => {
+      formData.append(key, (json[key] instanceof Object) ? JSON.stringify(json[key]) : json[key]);
+    });
+    return formData;
+  }
+  return null;
+}
+
+
+function formatDate(timestamp: number) {
+  const date = new Date(timestamp);
+  const year = date.getFullYear();
+  let month = (1 + date.getMonth()).toString();
+  month = month.length > 1 ? month : '0' + month;
+  let day = date.getDate().toString();
+  day = day.length > 1 ? day : '0' + day;
+  return `${year}-${month}-${day}`;
+}
+
+
+/** 初始化表单数据 */
+const initFormData = async () => {
+  const result = await reqest.get(`/business/officialSealUse/mobileAdd?flowInstanceId=${flowInstanceId}`)
+  formData.value = result.data
+  formData.value.createTimeC = formatDate(formData.value.createTime)
+
+
+  formData.value.officialSealUseTypeText = getDictLabel(DICT_TYPE.WF_SEAL_TYPE, formData.value.officialSealUseType);
+  formData.value.officialSealNameText = getDictLabel(DICT_TYPE.WF_SEAL_NAME, formData.value.officialSealName);
+}
+
+
+/** 初始化 */
+onMounted(() => {
+  initFormData()
+})
+</script>
+
+<style lang="scss" scoped>
+@import "./index.scss";
+
+::v-deep .van-field__label {
+  width: auto;
+}
+
+::v-deep .van-field__control {
+  text-align: right;
+}
+</style>

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

@@ -285,6 +285,14 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import("@/pages/supplier/index.vue"),
       },
+      {
+        path: "officialSealUse",
+        name: "officialSealUse",
+        meta: {
+          title: "盖章申请",
+        },
+        component: () => import("@/pages/officialSealUse/index.vue"),
+      },
     ] as RouteRecordRaw[],
   },
 ] as RouteRecordRaw[];

+ 10 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/officialSeal/controller/OfficialSealUseController.java

@@ -1,9 +1,11 @@
 package com.zjugis.business.flow.officialSeal.controller;
 
 
+import com.zjugis.business.flow.jobTransfer.controller.vo.JobTransferVO;
 import com.zjugis.business.flow.officialSeal.service.OfficialSealUseService;
 import com.zjugis.business.flow.officialSeal.vo.OfficialSealUseVO;
 
+import com.zjugis.framework.common.pojo.CommonResult;
 import com.zjugis.framework.workflow.model.BaseController;
 import com.zjugis.framework.workflow.workflow.WorkFlow;
 import io.swagger.v3.oas.annotations.Parameter;
@@ -45,6 +47,14 @@ public class OfficialSealUseController extends BaseController{
         return resultPage(map);
     }
 
+    /**
+     * 调岗申请表单生成 vue
+     */
+    @GetMapping("/mobileAdd")
+    public CommonResult<OfficialSealUseVO> mobileAdd(String activityTemplateId, String flowInstanceId, String userId){
+        return CommonResult.success(officialSealUseService.flowAdd(flowInstanceId, userId));
+    }
+
 
     /**
      * 创建公章申请流程

+ 1 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/officialSeal/service/OfficialSealUseService.java

@@ -44,4 +44,5 @@ public interface OfficialSealUseService {
      */
     Map<String, Object> getFormParams(String flowInstanceId, String userId);
 
+    OfficialSealUseVO flowAdd(String flowInstanceId, String userId);
 }

+ 6 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/officialSeal/service/OfficialSealUseServiceImpl.java

@@ -111,6 +111,12 @@ public class OfficialSealUseServiceImpl implements OfficialSealUseService {
         return createModelMap();
     }
 
+    @Override
+    public OfficialSealUseVO flowAdd(String flowInstanceId, String userId) {
+        OfficialSealUseDO entity = findByInstanceId(flowInstanceId);
+        return OfficialSealUseConvert.INSTANCE.convert(entity);
+    }
+
     private Map<String, Object> createModelMap() {
         Map<String, Object> map = new HashMap<>();
         map.put("formEntity", new HashMap<>());

+ 1 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/officialSeal/vo/OfficialSealUseVO.java

@@ -77,6 +77,7 @@ public class OfficialSealUseVO {
      */
     private String officialSealApplyReason;
 
+    private LocalDateTime createTime;
 
 
 }