cz 10 mesi fa
parent
commit
368bbbfdcd

+ 15 - 0
src/router/index.js

@@ -701,6 +701,21 @@ const routes = [{
 				name: "外包加工账单明细",
 				component: () => import("../views/oa/processingBill/add.vue"),
 			},
+			{
+				path: "become",
+				name: "员工转正申请",
+				component: () => import("../views/finance/become/index.vue"),
+			},
+			{
+				path: "changeSalary",
+				name: "员工调薪申请",
+				component: () => import("../views/finance/changeSalary/index.vue"),
+			},
+			{
+				path: "equipmentMaintenance",
+				name: "设备维修",
+				component: () => import("../views/oa/equipmentMaintenance/index.vue"),
+			},
 			// 
 
 		]

+ 172 - 0
src/views/finance/become/index.vue

@@ -0,0 +1,172 @@
+<template>
+  <van-nav-bar :title="'员工转正申请'" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <!-- <template #right>
+      {{ $t("common.add") }}
+    </template> -->
+  </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig">
+          <template #employeeType="{row}">
+            <div style="width:100%">
+              {{dictValueLabel(row.employeeType,employeeTypeData)}}
+            </div>
+          </template>
+          <template #status="{row}">
+            <div style="width:100%">
+              {{dictValueLabel(row.status,statusData)}}
+            </div>
+          </template>
+        </commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+  <!-- <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" /> -->
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+import { getAllDict } from "@/utils/auth";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const onClickRight = () => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "contract_flow",
+    },
+  });
+};
+const actionType = ref(false);
+const actions = ref([
+  {
+    name: proxy.t("common.view"),
+    type: "1",
+  },
+  {
+    name: proxy.t("common.contractChange"),
+    type: "2",
+  },
+  {
+    name: proxy.t("common.cancel"),
+  },
+]);
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/promotionApply/page", req.value)
+    .then((res) => {
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+let rowData = ref({});
+
+const toDtl = (row) => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "promotion_apply_flow",
+      id: row.flowId,
+      processType: 20,
+      businessId: row.id,
+    },
+  });
+};
+const employeeTypeData = ref([
+  {
+    label: "实习员工",
+    value: "10",
+  },
+  {
+    label: "试用员工",
+    value: "20",
+  },
+  {
+    label: "正式员工",
+    value: "30",
+  },
+]);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+
+const listConfig = ref([
+  {
+    label: "员工姓名",
+    prop: "userName",
+  },
+  {
+    type: "slot",
+    label: "劳动关系",
+    slotName: "employeeType",
+  },
+  {
+    label: "转正日期",
+    prop: "promotionDate",
+  },
+  {
+    label: "备注",
+    prop: "remark",
+  },
+  {
+    label: "创建时间",
+    prop: "createTime",
+  },
+  {
+    type: "slot",
+    label: "审批状态",
+    slotName: "status",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>

+ 180 - 0
src/views/finance/changeSalary/index.vue

@@ -0,0 +1,180 @@
+<template>
+  <van-nav-bar :title="'员工调薪申请'" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <!-- <template #right>
+      {{ $t("common.add") }}
+    </template> -->
+  </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig">
+          <template #employeeType="{row}">
+            <div style="width:100%">
+              {{dictValueLabel(row.employeeType,employeeTypeData)}}
+            </div>
+          </template>
+          <template #status="{row}">
+            <div style="width:100%">
+              {{dictValueLabel(row.status,statusData)}}
+            </div>
+          </template>
+        </commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+  <!-- <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" /> -->
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+import { getAllDict } from "@/utils/auth";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const onClickRight = () => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "contract_flow",
+    },
+  });
+};
+const actionType = ref(false);
+const actions = ref([
+  {
+    name: proxy.t("common.view"),
+    type: "1",
+  },
+  {
+    name: proxy.t("common.contractChange"),
+    type: "2",
+  },
+  {
+    name: proxy.t("common.cancel"),
+  },
+]);
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/adjustSalaryApply/page", req.value)
+    .then((res) => {
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+let rowData = ref({});
+
+const toDtl = (row) => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "adjust_salary_apply_flow",
+      id: row.flowId,
+      processType: 20,
+      businessId: row.id,
+    },
+  });
+};
+const employeeTypeData = ref([
+  {
+    label: "实习员工",
+    value: "10",
+  },
+  {
+    label: "试用员工",
+    value: "20",
+  },
+  {
+    label: "正式员工",
+    value: "30",
+  },
+]);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+
+const listConfig = ref([
+  {
+    label: "员工姓名",
+    prop: "userName",
+  },
+  {
+    type: "slot",
+    label: "劳动关系",
+    slotName: "employeeType",
+  },
+  {
+    label: "调薪日期",
+    prop: "adjustDate",
+  },
+  {
+    label: "考勤结算金额",
+    prop: "amount",
+  },
+  {
+    label: "记件结算金额",
+    prop: "perfAmount",
+  },
+  {
+    label: "调薪备注",
+    prop: "adjustRemark",
+  },
+  {
+    label: "创建时间",
+    prop: "createTime",
+  },
+  {
+    type: "slot",
+    label: "审批状态",
+    slotName: "status",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>

+ 1 - 1
src/views/main.vue

@@ -152,7 +152,7 @@ const getSubscriptCount = () => {
         }
       })
       .catch((err) => {});
-  }, 1000 * 30);
+  }, 1000 * 60);
 };
 getSubscriptCount();
 //判断是否是ios系统

+ 160 - 0
src/views/oa/equipmentMaintenance/index.vue

@@ -0,0 +1,160 @@
+<template>
+  <van-nav-bar :title="'设备维修'" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
+    <!-- <template #right>
+      {{ $t("common.add") }}
+    </template> -->
+  </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" :config="listConfig" :showMore="false">
+          <!-- @onClick="toDtl" -->
+          <template #file="{row}">
+            <div style="width:100%">
+              <div v-for="file in row.fileList" :key="file.id" style="color: #409eff;cursor: pointer;"
+                   @click="onPreviewFile(file.fileName,file.fileUrl)">
+                {{file.fileName}}
+              </div>
+            </div>
+          </template>
+        </commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+  <!-- <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" /> -->
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+import { getAllDict } from "@/utils/auth";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const onClickRight = () => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "contract_flow",
+    },
+  });
+};
+const actionType = ref(false);
+const actions = ref([
+  {
+    name: proxy.t("common.view"),
+    type: "1",
+  },
+  {
+    name: proxy.t("common.contractChange"),
+    type: "2",
+  },
+  {
+    name: proxy.t("common.cancel"),
+  },
+]);
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/deviceRepair/page", req.value)
+    .then((res) => {
+      res.data.rows = res.data.rows.map((x) => ({ ...x, fileList: [] }));
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      let ids = listData.value.map((x) => x.id);
+      proxy.getFile(ids, listData.value);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+let rowData = ref({});
+
+const toDtl = (row) => {
+  proxy.$router.push({
+    path: "/main/processDtl",
+    query: {
+      flowKey: "education_subsidy_flow",
+      id: row.flowId,
+      processType: 20,
+      businessId: row.id,
+    },
+  });
+};
+
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+
+const listConfig = ref([
+  {
+    label: "设备型号",
+    prop: "deviceModel",
+  },
+  {
+    label: "配件",
+    prop: "partsName",
+  },
+  {
+    label: "厂家",
+    prop: "factoryName",
+  },
+  {
+    label: "维修方案",
+    prop: "schemeRemark",
+  },
+  {
+    label: "成本费用",
+    prop: "amount",
+  },
+  {
+    type: "slot",
+    label: "附件",
+    slotName: "file",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>

+ 214 - 0
src/views/processApproval/components/Become.vue

@@ -0,0 +1,214 @@
+<template>
+  <div class="form">
+    <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom">
+      <template #file>
+        <div style="width:100%">
+          <div v-for="file in formData.data.fileList" :key="file.id" style="color: #409eff;cursor: pointer;"
+               @click="onPreviewFile(file.fileName,file.fileUrl)">
+            {{file.fileName}}
+          </div>
+        </div>
+      </template>
+    </testForm>
+  </div>
+</template>
+
+<script setup>
+import {
+  ref,
+  getCurrentInstance,
+  onMounted,
+  defineProps,
+  defineExpose,
+  watch,
+  reactive,
+  toRefs,
+} from "vue";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+import { getUserInfo } from "@/utils/auth";
+import { showFailToast } from "vant";
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const refProps = toRefs(props);
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const active = ref(0);
+const tabsChange = () => {
+  active.value++;
+};
+const selectData = ref([]);
+const userList = ref([]);
+const formData = reactive({
+  data: {},
+});
+const formDom = ref(null);
+const formOption = reactive({
+  readonly: false,
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  hiddenSubmitBtn: true,
+});
+const formConfig = reactive([
+  {
+    type: "title",
+    title: "基本信息",
+  },
+  {
+    type: "picker",
+    label: "申请人",
+    prop: "userId",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "转正日期",
+    prop: "promotionDate",
+    itemType: "text",
+    readonly: true,
+  },
+
+  {
+    type: "picker",
+    label: "当前劳动关系",
+    prop: "oldEmployeeType",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+    readonly: true,
+  },
+
+  {
+    type: "picker",
+    label: "转劳动关系",
+    prop: "employeeType",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "备注",
+    prop: "remark",
+    itemType: "textarea",
+    readonly: true,
+  },
+  // {
+  //   type: "slot",
+  //   label: "学历证明附件",
+  //   slotName: "file",
+  // },
+]);
+
+const rules = {};
+
+const getDict = () => {
+  proxy
+    .post("/educationConfig/page", {
+      pageNum: 1,
+      pageSize: 999,
+    })
+    .then((res) => {
+      selectData.value = res.data.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
+};
+getDict();
+
+const status = ref(true);
+const handleSubmit = async () => {
+  if (status.value) {
+    return formData.data;
+  }
+};
+const employeeTypeData = ref([
+  {
+    label: "实习员工",
+    value: "10",
+  },
+  {
+    label: "试用员工",
+    value: "20",
+  },
+  {
+    label: "正式员工",
+    value: "30",
+  },
+]);
+const getUser = () => {
+  return proxy
+    .get("/tenantUser/listAll", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: getUserInfo().tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        formConfig[1].data = res.rows.map((item) => {
+          return {
+            label: item.nickName,
+            value: item.userId,
+          };
+        });
+        formConfig[3].data = employeeTypeData.value;
+        formConfig[4].data = employeeTypeData.value;
+      }
+    });
+};
+getUser();
+onMounted(() => {
+  if (route.query && route.query.businessId) {
+    formOption.readonly = true;
+    formOption.hiddenSubmitBtn = true;
+    let businessId = route.query.businessId;
+    proxy.post("/promotionApply/detail", { id: businessId }).then((res) => {
+      res.data.employeeType = res.data.employeeType + "";
+      formData.data = res.data;
+    });
+  }
+});
+
+defineExpose({
+  handleSubmit,
+  tabsChange,
+});
+onMounted(() => {});
+</script>
+<style lang="scss" scoped>
+._title {
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  font-weight: 700;
+  margin-left: -10px;
+  .line {
+    width: 4px;
+    background-color: #0084ff;
+    height: 15px;
+    margin-right: 8px;
+  }
+}
+</style>

+ 282 - 0
src/views/processApproval/components/ChangeSalary.vue

@@ -0,0 +1,282 @@
+<template>
+  <div class="form">
+    <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom">
+      <template #file>
+        <div style="width:100%">
+          <div style="margin-bottom:5px;color:red">表格可向右滑动</div>
+          <div style="width:100%;overflow-x:auto">
+            <table border class="table">
+              <tr>
+                <td rowspan="5" style="min-width:30px">
+                  薪资
+                </td>
+                <td :colspan="salaryStructureData.length+2" style="text-align:center">
+                  考勤结算 or 业绩/记件结算
+                </td>
+              </tr>
+              <tr>
+                <td rowspan="2" style="min-width:40px">考勤结算</td>
+                <td v-for="col in salaryStructureData" :key="col.value" style="min-width:70px">
+                  {{col.label}}
+                </td>
+                <td style="width:10%">合计</td>
+              </tr>
+              <tr>
+                <td v-for="col in salaryStructureData" :key="col.value" style="min-width:70px">
+                  {{formData.data.salaryData[col.value+'-10']}}
+                </td>
+                <td>{{formData.data.amount}}</td>
+              </tr>
+              <tr>
+                <td rowspan="2">业绩/记件结算</td>
+                <td v-for="col in salaryStructureData" :key="col.value">
+                  {{col.label}}
+                </td>
+                <td>合计</td>
+              </tr>
+              <tr>
+                <td v-for="col in salaryStructureData" :key="col.value">
+                  {{formData.data.salaryData[col.value+'-20']}}
+                </td>
+                <td>{{formData.data.perfAmount}}</td>
+              </tr>
+            </table>
+          </div>
+        </div>
+      </template>
+    </testForm>
+  </div>
+</template>
+
+<script setup>
+import {
+  ref,
+  getCurrentInstance,
+  onMounted,
+  defineProps,
+  defineExpose,
+  watch,
+  reactive,
+  toRefs,
+} from "vue";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+import { getUserInfo } from "@/utils/auth";
+import { showFailToast } from "vant";
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const refProps = toRefs(props);
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const active = ref(0);
+const tabsChange = () => {
+  active.value++;
+};
+const salaryStructureData = ref([]);
+const userList = ref([]);
+const formData = reactive({
+  data: {},
+});
+const formDom = ref(null);
+const formOption = reactive({
+  readonly: false,
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  hiddenSubmitBtn: true,
+});
+const formConfig = reactive([
+  {
+    type: "title",
+    title: "基本信息",
+  },
+  {
+    type: "picker",
+    label: "申请人",
+    prop: "userId",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+    readonly: true,
+  },
+  {
+    type: "picker",
+    label: "劳动关系",
+    prop: "employeeType",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "实习期薪资比例(%)",
+    prop: "internshipRatio",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "试用期薪资比例(%)",
+    prop: "probationRatio",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "调薪日期",
+    prop: "adjustDate",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: "调薪说明",
+    prop: "adjustRemark",
+    itemType: "textarea",
+    readonly: true,
+  },
+  {
+    type: "title",
+    title: "调薪明细",
+  },
+  {
+    type: "slot",
+    label: "",
+    slotName: "file",
+  },
+]);
+
+const rules = {};
+
+const getDict = () => {
+  proxy
+    .post("/salaryStructure/page", {
+      pageNum: 1,
+      pageSize: 999,
+    })
+    .then((res) => {
+      salaryStructureData.value = res.data.rows
+        .map((item) => {
+          let obj = {
+            label: item.name,
+            value: item.id,
+          };
+          obj.disabled = !item.name.includes("基本工资");
+          return obj;
+        })
+        .reverse();
+    });
+};
+getDict();
+
+const status = ref(true);
+const handleSubmit = async () => {
+  if (status.value) {
+    return formData.data;
+  }
+};
+const employeeTypeData = ref([
+  {
+    label: "实习员工",
+    value: "10",
+  },
+  {
+    label: "试用员工",
+    value: "20",
+  },
+  {
+    label: "正式员工",
+    value: "30",
+  },
+]);
+const getUser = () => {
+  return proxy
+    .get("/tenantUser/listAll", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: getUserInfo().tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        formConfig[1].data = res.rows.map((item) => {
+          return {
+            label: item.nickName,
+            value: item.userId,
+          };
+        });
+        formConfig[2].data = employeeTypeData.value;
+      }
+    });
+};
+getUser();
+onMounted(() => {
+  if (route.query && route.query.businessId) {
+    formOption.readonly = true;
+    formOption.hiddenSubmitBtn = true;
+    let businessId = route.query.businessId;
+    proxy.post("/adjustSalaryApply/detail", { id: businessId }).then((res) => {
+      res.data.employeeType = res.data.employeeType + "";
+      res.data.salaryData = {};
+      if (
+        res.data.userSalaryDetailList &&
+        res.data.userSalaryDetailList.length > 0
+      ) {
+        for (let i = 0; i < res.data.userSalaryDetailList.length; i++) {
+          const row = res.data.userSalaryDetailList[i];
+          res.data.salaryData[row.salaryStructureId + "-" + row.type] =
+            row.money;
+        }
+      }
+      formData.data = res.data;
+    });
+  }
+});
+
+defineExpose({
+  handleSubmit,
+  tabsChange,
+});
+onMounted(() => {});
+</script>
+<style lang="scss" scoped>
+._title {
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  font-weight: 700;
+  margin-left: -10px;
+  .line {
+    width: 4px;
+    background-color: #0084ff;
+    height: 15px;
+    margin-right: 8px;
+  }
+}
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+  width: 100%;
+  border-color: #ebeef5;
+  color: #606266;
+  thead tr th {
+    padding: 6px;
+    text-align: center;
+  }
+  td {
+    text-align: left;
+    padding: 6px;
+  }
+}
+</style>

+ 134 - 23
src/views/processApproval/processDtl.vue

@@ -97,10 +97,55 @@
         </div>
       </div>
     </van-action-sheet>
+
+    <!-- <van-dialog v-model:show="dialogVisible" :title="dialogTitle" show-cancel-button @cancel="(val)=>handleNextClose(val)" @confirm="handleSelectUser"
+                @close="(val)=>handleNextClose(val)"> -->
+
+    <!-- </van-dialog> -->
+
+    <van-popup v-model:show="dialogVisible" position="bottom" :style="{ height: '70vh' }" :close-on-click-overlay="false">
+      <div style="height:55vh;overflow:auto;margin-top:20px">
+        <div v-if="nextHandleUser && nextHandleUser.length>0">
+          <div>
+            <van-picker v-for="(node,index) in nextHandleUser" :key="node.nodeId" :title="node.nodeName+'已选择:'+node.handleUserName"
+                        :columns="node.userList" :columns-field-names="{text: 'nickName',
+      value: 'userId',}" cancel-button-text=" " @confirm="(val)=>onConfirm(val,node,index)">
+              <template #title>
+                <div>
+                  <div>
+                    节点:{{node.nodeName}}
+                  </div>
+                  <div>
+                    已选择:<span style="color:red">{{node.handleUserName}}</span>
+                  </div>
+                </div>
+              </template>
+            </van-picker>
+          </div>
+        </div>
+        <div v-if="flowDefinitionNodeList && flowDefinitionNodeList.length>0">
+          <van-picker :title="'退回节点'" :columns="flowDefinitionNodeList" :columns-field-names="{text: 'nodeName',
+      value: 'id',}" cancel-button-text=" " @confirm="(val)=>onConfirmOne(val)">
+            <template #title>
+              <div>
+                <div>
+                  退回节点:<span style="color:red">{{flowForm.handleNodeName}}</span>
+                </div>
+              </div>
+            </template>
+          </van-picker>
+        </div>
+      </div>
+
+      <div style="text-align:center">
+        <van-button type="default" @click="handleNextClose()" style="margin-right:20px"> 取消</van-button>
+        <van-button type="primary" @click="handleSelectUser()">提交</van-button>
+      </div>
+    </van-popup>
   </div>
 </template>
 <script setup>
-import { ref, getCurrentInstance, onMounted, reactive } from "vue";
+import { ref, getCurrentInstance, onMounted, reactive, watch } from "vue";
 import { useRoute } from "vue-router";
 import SendSubscribe from "./components/SendSubscribe";
 import SendFunds from "./components/SendFunds";
@@ -121,6 +166,8 @@ import ActivityPriceInventory from "./components/ActivityPriceInventory";
 import InvoicingApplication from "./components/InvoicingApplication";
 import InvoiceTaxDeduction from "./components/InvoiceTaxDeduction";
 import PersonalInvoice from "./components/PersonalInvoice";
+import Become from "./components/Become";
+import ChangeSalary from "./components/ChangeSalary";
 
 import SendPurchase from "./components/SendPurchase";
 import SendPurchasePayment from "./components/SendPurchasePayment";
@@ -284,17 +331,88 @@ let componentObj = ref({
     backUrl: "/main/working",
     tabsNum: 0,
   },
+  promotion_apply_flow: {
+    title: "员工转正申请发起流程",
+    component: Become,
+    backUrl: "/main/working",
+    tabsNum: 0,
+  },
+  adjust_salary_apply_flow: {
+    title: "员工调薪申请发起流程",
+    component: ChangeSalary,
+    backUrl: "/main/working",
+    tabsNum: 0,
+  },
 });
 
 let dialogVisible = ref(false);
+const flowDefinitionNodeList = ref([]);
+const nextHandleUser = ref([]);
+const dialogTitle = ref("");
 //判断是否有下一节点处理人
 const handleResult = (res) => {
-  if (res !== null && res.success) {
+  if (res.success) {
     skipPage();
-  } else {
+  } else if (res.selectUserList && res.selectUserList.length > 0) {
+    flowDefinitionNodeList.value = [];
+    dialogTitle.value = "下一处理人";
+    dialogVisible.value = true;
+    nextHandleUser.value = res.selectUserList;
+  } else if (
+    res.flowDefinitionNodeList &&
+    res.flowDefinitionNodeList.length > 0
+  ) {
+    nextHandleUser.value = [];
+    dialogTitle.value = "退回到指定节点";
     dialogVisible.value = true;
-    nextHandleUser.value = res.userList;
+    flowDefinitionNodeList.value = res.flowDefinitionNodeList;
+  } else {
+    return showFailToast("请联系管理员!");
   }
+  // if (flowForm.flowKey == "medical_insurance_flow") {
+  //   makeDom.value.dataRollback();
+  // }
+};
+
+const onConfirm = ({ selectedValues }, node, index) => {
+  let value = selectedValues[0];
+  const current = node.userList.find((x) => x.userId == value);
+  nextHandleUser.value[index].handleUserId = value;
+  node.handleUserName = current.nickName;
+};
+
+const onConfirmOne = ({ selectedValues }) => {
+  let value = selectedValues[0];
+  const current = flowDefinitionNodeList.value.find((x) => x.id == value);
+  flowForm.handleNodeId = value;
+  flowForm.handleNodeName = current.nodeName;
+};
+
+const handleType = ref(null);
+const handleNextClose = () => {
+  for (let i = 0; i < nextHandleUser.value.length; i++) {
+    const node = nextHandleUser.value[i];
+    node.handleUserId = "";
+  }
+  nextHandleUser.value = [];
+  dialogVisible.value = false;
+};
+const handleSelectUser = () => {
+  if (nextHandleUser.value && nextHandleUser.value.length > 0) {
+    for (let i = 0; i < nextHandleUser.value.length; i++) {
+      const node = nextHandleUser.value[i];
+      if (!node.handleUserId) {
+        return showFailToast("请选择下一节点处理人!");
+      }
+    }
+  }
+  if (flowDefinitionNodeList.value && flowDefinitionNodeList.value.length > 0) {
+    if (!flowForm.handleNodeId) {
+      return showFailToast("请选择要退回的节点!");
+    }
+  }
+
+  handleSubmit(handleType.value);
 };
 const skipPage = () => {
   onClickLeft();
@@ -306,16 +424,8 @@ const skipPage = () => {
   // })
 };
 
-const handleSelectUser = () => {
-  if (!flowForm.handleUserId) {
-    return ElMessage({
-      message: "请选择下一节点处理人!",
-      type: "info",
-    });
-  }
-  handleSubmit();
-};
 const handleSubmit = async (_type) => {
+  handleType.value = _type ? _type : undefined;
   const childrenData = await makeDom.value.handleSubmit();
   if (childrenData) {
     if (route.query.processType == 10 || route.query.processType == 30) {
@@ -326,19 +436,20 @@ const handleSubmit = async (_type) => {
           handleType: _type,
           version: route.query.version,
           flowId: route.query.id,
+          selectUserList: nextHandleUser.value,
         })
         .then((res) => {
-          // handleResult(res.data)
-          proxy.$router.go(-1);
+          handleResult(res.data);
+          // proxy.$router.go(-1);
         });
-      if (_type && _type == 1) {
-        proxy
-          .post("/flowExample/setStartData", {
-            exampleId: route.query.id,
-            startData: childrenData,
-          })
-          .then();
-      }
+      // if (_type && _type == 1) {
+      //   proxy
+      //     .post("/flowExample/setStartData", {
+      //       exampleId: route.query.id,
+      //       startData: childrenData,
+      //     })
+      //     .then();
+      // }
       return;
     } else {
       proxy