فهرست منبع

合同续签钉钉端

jzh 11 ماه پیش
والد
کامیت
e28e744220

+ 33 - 0
client_h5/src/pages/contractRenew/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%;
+    }
+  }

+ 191 - 0
client_h5/src/pages/contractRenew/index.vue

@@ -0,0 +1,191 @@
+<template>
+  <flow-form :data="formData" @submit="submitNextActivity">
+    <card title="基础信息" style="height: auto">
+      <van-form ref="form">
+        <van-cell-group inset>
+          <van-field
+              v-model="formData.nickname"
+              name="员工姓名"
+              label="员工姓名"
+              placeholder="员工姓名"
+              readonly
+          />
+
+          <van-field
+              v-model="formData.drzwText"
+              name="岗位"
+              label="岗位"
+              placeholder="岗位"
+              readonly
+          />
+
+          <van-field
+              v-model="formData.deptName"
+              name="部门"
+              label="部门"
+              placeholder="部门"
+              readonly
+          />
+          <van-field
+              v-model="formData.createTimec"
+              name="申请时间"
+              label="申请时间"
+              placeholder="申请时间"
+              readonly
+          />
+
+          <van-field
+              v-model="formData.rgssjc"
+              name="入职时间"
+              label="入职时间"
+              placeholder="入职时间"
+              readonly
+          />
+
+
+          <van-field
+              v-model="formData.htdqsc"
+              name="旧合同到期时间"
+              label="旧合同到期时间"
+              placeholder="旧合同到期时间"
+              readonly
+          />
+
+          <van-field
+              v-model="formData.xqcs"
+              name="续签次数"
+              label="续签次数"
+              placeholder="续签次数"
+              readonly
+          />
+          <van-field
+              v-model="formData.xqnx"
+              name="续签年限"
+              label="续签年限"
+              placeholder="续签年限"
+              readonly
+          />
+          <van-field
+              v-model="formData.ygszdText"
+              name="员工所在地"
+              label="员工所在地"
+              placeholder="员工所在地"
+              readonly
+          />
+
+          <van-field
+              v-model="formData.htqdsjc"
+              name="新合同续签时间"
+              label="新合同续签时间"
+              placeholder="新合同续签时间"
+              readonly
+          />
+          <van-field
+              v-model="formData.xhtdqsc"
+              name="新合同到期时间"
+              label="新合同到期时间"
+              placeholder="新合同到期时间"
+              readonly
+          />
+
+        </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/contractRenew/mobileAdd?flowInstanceId=${flowInstanceId}`)
+  formData.value = result.data
+
+
+  formData.value.createTimec = formatDate(formData.value.createTime); //申请日期
+  formData.value.rgssjc = formatDate(formData.value.rgssj);
+  formData.value.htdqsc = formatDate(formData.value.htdqs);
+  formData.value.htqdsjc = formatDate(formData.value.htqdsj);
+  formData.value.xhtdqsc = formatDate(formData.value.xhtdqs);
+
+  formData.value.drzwText = getDictLabel(DICT_TYPE.POST_TYPE, formData.value.drzw);
+  formData.value.ygszdText = getDictLabel(DICT_TYPE.LOCATION_TYPE, formData.value.ygszd);
+
+
+}
+
+
+/** 初始化 */
+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

@@ -317,6 +317,14 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import("@/pages/officialSealOuter/index.vue"),
       },
+      {
+        path: "contractRenew",
+        name: "contractRenew",
+        meta: {
+          title: "合同续签",
+        },
+        component: () => import("@/pages/contractRenew/index.vue"),
+      },
     ] as RouteRecordRaw[],
   },
 ] as RouteRecordRaw[];

+ 1 - 0
client_h5/src/utils/dict.ts

@@ -192,4 +192,5 @@ export enum DICT_TYPE {
     POLITY_TYPE = 'polity_type',
     XL_TYPE = 'xl_type',
     CONTACT_TYPE = 'contact_type',
+    LOCATION_TYPE = 'location_type',
 }