Browse Source

新增人员借调

sunyanqiang 2 years ago
parent
commit
9061b7a5a8

+ 27 - 0
src/assets/styles/global.css

@@ -618,6 +618,33 @@ color: #fff;
   color: #FFFFFF;
 }
 
+/* 按钮调动管理审核 */
+.el-button--bde {
+  width: 70px !important;
+  height: 35px;
+  border: 1px solid transparent;
+  padding: 3px 8px;
+  font-size: 14px;
+  line-height: 1.5;
+  border-radius: 3px;
+  color: #fff;
+  background-color: #1d96ff;
+}
+
+.el-button--bde:focus,
+.el-button--bde:hover {
+  background: #41a4fa;
+  border-color: #41a4fa;
+  color: #FFFFFF;
+}
+
+.el-button--bde.is-active,
+.el-button--bde:active {
+  background: #1d96ff;
+  border-color: #1d96ff;
+  color: #FFFFFF;
+}
+
 /* 控制按钮样式颜色 end */
 
 

+ 0 - 1
src/views/militaryvehicleManagement/thebusApply/index.vue

@@ -1091,7 +1091,6 @@ import {
   getThebusUser,
 } from "@/api/militaryvehicleManagement/thebusConfig";
 import { getAll, getUser } from "@/api/grassrootsregistration/bdglmeeting";
-// import { getAll } from "@/api/peopleChuRu/bdglLeave";
 
 export default {
   name: "ThebusApply",

+ 708 - 0
src/views/peopleManage/seconded/index.vue

@@ -0,0 +1,708 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
+      <el-form-item label="" prop="peopleId">
+        <el-input
+          v-model="queryParams.cName"
+          placeholder="请输入调出人员"
+          clearable
+          size="small"
+          @input="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button size="btr" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['peopleManage:transfer:add']"
+          >调出</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="transferList"
+      :header-cell-style="{ background: '#003C69', color: 'white' }"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" align="center" type="index" />
+      <el-table-column label="调动人员姓名" align="center" prop="cName" />
+      <el-table-column label="调动类型" align="center" prop="transferId">
+        <template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.sys_transferId"
+            :value="scope.row.transferId"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="调动日期"
+        align="center"
+        prop="transferDate"
+        width="180"
+      >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.transferDate, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="调动后军衔" align="center" prop="militaryRank2">
+        <template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.sys_user_rank"
+            :value="scope.row.militaryRank2"
+          />
+        </template>
+      </el-table-column>
+      <el-table-column label="调动后职务" align="center" prop="post2">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.post_Level" :value="scope.row.post2" />
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="调动后单位"
+        align="center"
+        prop="unit2"
+        :formatter="unit2Format"
+      />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="btu"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['peopleManage:transfer:edit']"
+            >修改</el-button
+          >
+          <el-button
+            size="btd"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['peopleManage:transfer:remove']"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改调动管理对话框 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="1400px"
+      append-to-body
+      :close-on-click-modal="false"
+      custom-class="box1"
+    >
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        :inline="true"
+        label-width="120px"
+      >
+        <table
+          border="1"
+          style="
+            border-collapse: collapse;
+            border: none;
+            mso-border-left-alt: 0.5pt solid windowtext;
+            mso-border-top-alt: 0.5pt solid windowtext;
+            mso-border-right-alt: 0.5pt solid windowtext;
+            mso-border-bottom-alt: 0.5pt solid windowtext;
+            mso-border-insideh: 0.5pt solid windowtext;
+            mso-border-insidev: 0.5pt solid windowtext;
+            mso-padding-alt: 0pt 0pt 0pt 0pt;
+            display: inline-block;
+            color: #fff;
+          "
+          width="441px"
+        >
+          <tbody style="border-bottom: 1px solid">
+            <tr align="center" class="tr">
+              <td width="220" height="40">调出人员</td>
+              <td width="220" height="56">
+                <el-form-item prop="messOfficer">
+                  <el-select
+                    v-model="form.messOfficer"
+                    placeholder="请选择人员"
+                    clearable
+                    filterable
+                  >
+                    <el-option
+                      v-for="item in renYuan"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                      class="input_xiala"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </td>
+            </tr>
+            <tr
+              align="center"
+              class="tr"
+              v-for="item in shenList"
+              :key="item.id"
+            >
+              <td width="220" height="40">{{ item.name }}</td>
+              <td width="220" height="40">
+                <el-button type="bde" style="margin: 9px 0"
+                  >审 核</el-button
+                >
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        <table
+          border="1"
+          style="
+            border-collapse: collapse;
+            border: none;
+            mso-border-left-alt: 0.5pt solid windowtext;
+            mso-border-top-alt: 0.5pt solid windowtext;
+            mso-border-right-alt: 0.5pt solid windowtext;
+            mso-border-bottom-alt: 0.5pt solid windowtext;
+            mso-border-insideh: 0.5pt solid windowtext;
+            mso-border-insidev: 0.5pt solid windowtext;
+            mso-padding-alt: 0pt 0pt 0pt 0pt;
+            display: inline-block;
+            color: #fff;
+          "
+          width="441px"
+        >
+          <tbody style="border-bottom: 1px solid; border-left: transparent">
+            <tr
+              align="center"
+              class="tr"
+              v-for="item in shenListRight"
+              :key="item.id"
+            >
+              <td width="220" height="40">{{ item.name }}</td>
+              <td width="220" height="40">
+                <el-button type="bde" style="margin: 9px 0"
+                  >审 核</el-button
+                >
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel" size="btn">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+  
+  <script>
+import {
+  listTransfer,
+  getTransfer,
+  delTransfer,
+  addTransfer,
+  updateTransfer,
+  exportTransfer,
+  listPeople,
+  getPeople,
+  getDept,
+} from "@/api/peopleManage/transfer";
+import { getAll } from "@/api/grassrootsregistration/bdglmeeting";
+
+export default {
+  name: "Transfer",
+  dicts: [
+    "sys_user_sex",
+    "post_Level",
+    "sys_user_rank",
+    "personnel_type",
+    "Degree_level",
+    "degree",
+    "Caucus",
+    "marryList",
+    "sys_yw",
+    "healthy",
+    "bloodType",
+    "sys_yes_no",
+    "sys_yes_no",
+    "sys_transferId",
+  ],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 调动管理表格数据
+      transferList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+      //调动人员对象
+      peopleIds: [],
+      //调动类型
+      transferIds: [],
+      //职务层级
+      postIds: [],
+      //军衔
+      rankIds: [],
+      //单位
+      unitId: [],
+      // 人员列表
+      renYuan: [],
+      //审核内容左
+      shenList: [
+        {
+          id: 1,
+          name: "运输营房审核:",
+          type: "transportation",
+        },
+        {
+          id: 2,
+          name: "财务审核:",
+          type: "finance",
+        },
+        {
+          id: 3,
+          name: "保障处处长审核:",
+          type: "guaranteez",
+        },
+        {
+          id: 4,
+          name: "宣传审核:",
+          type: "propaganda",
+        },
+        {
+          id: 5,
+          name: "组织纪检审核:",
+          type: "tissueembolus",
+        },
+        {
+          id: 6,
+          name: "政治工作处主任审核:",
+          type: "zzgzczr",
+        },
+        {
+          id: 7,
+          name: "保密室审核:",
+          type: "bms",
+        },
+        {
+          id: 8,
+          name: "训练管理审核:",
+          type: "xlgl",
+        },
+        {
+          id: 9,
+          name: "副参谋长审核:",
+          type: "fcmz",
+        },
+        {
+          id: 10,
+          name: "总师审核:",
+          type: "zsz",
+        },
+        {
+          id: 11,
+          name: "副站长审核:",
+          type: "fzz",
+        },
+        {
+          id: 12,
+          name: "站长审核:",
+          type: "zz",
+        },
+      ],
+      //审核内容右
+      shenListRight: [
+        {
+          id: 1,
+          name: "装备审核:",
+          type: "zb",
+        },
+        {
+          id: 2,
+          name: "供应审核:",
+          type: "gy",
+        },
+        {
+          id: 3,
+          name: "保障处副处长审核:",
+          type: "guaranteef",
+        },
+        {
+          id: 4,
+          name: "保卫审核:",
+          type: "bw",
+        },
+        {
+          id: 5,
+          name: "人力资源审核:",
+          type: "rlzy",
+        },
+        {
+          id: 6,
+          name: "政治工作处副主任审核:",
+          type: "zzggcfzr",
+        },
+        {
+          id: 7,
+          name: "图书室审核:",
+          type: "tss",
+        },
+        {
+          id: 8,
+          name: "机要兼信息保障审核:",
+          type: "jyjxxbz",
+        },
+        {
+          id: 9,
+          name: "作试审核:",
+          type: "zs",
+        },
+        {
+          id: 10,
+          name: "参谋长审核:",
+          type: "cmz",
+        },
+        {
+          id: 11,
+          name: "副政委审核:",
+          type: "fzw",
+        },
+        {
+          id: 12,
+          name: "政委审核:",
+          type: "zw",
+        },
+      ],
+    };
+  },
+  created() {
+    this.getList();
+    //调动人员对象
+    listPeople().then((res) => {
+      if (res.code == 200) {
+        this.peopleIds = res.rows;
+      }
+    });
+    //调动类型
+    this.getDicts("sys_transferId").then((response) => {
+      this.transferIds = response.data;
+    });
+    //职务层级
+    this.getDicts("post_Level").then((response) => {
+      this.postIds = response.data;
+    });
+    //军衔
+    this.getDicts("sys_user_rank").then((response) => {
+      this.rankIds = response.data;
+    });
+    //部门数据
+    getDept().then((res) => {
+      if (res.code == 200) {
+        this.unitId = res.data;
+      }
+    });
+    this.getQuanR();
+  },
+  methods: {
+    // 获取全部人员
+    getQuanR() {
+      getAll().then((res) => {
+        this.renYuan = res.data;
+      });
+    },
+    // 获取部门列表
+    getBuMen() {
+      //部门数据
+      getDept().then((res) => {
+        if (res.code == 200) {
+          this.unitId = res.data;
+        }
+      });
+    },
+    /** 查询调动管理列表 */
+    getList() {
+      this.loading = true;
+      listTransfer(this.queryParams).then((response) => {
+        this.transferList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //单位翻译
+    unit2Format(row, column) {
+      var deptName = "";
+      this.unitId.map((item) => {
+        if (item.deptId == row.unit2) {
+          deptName = item.deptName;
+        }
+      });
+      return deptName;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        peopleId: null,
+        transferId: null,
+        transferDate: null,
+        transferTake: null,
+        militaryRank1: null,
+        militaryRank2: null,
+        post1: null,
+        post2: null,
+        unit1: null,
+        unit2: null,
+        aduty: null,
+        commandNumber: null,
+        reason: null,
+        remark: null,
+        field1: null,
+        createtime: null,
+        updatetime: null,
+        cName: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.cName = null;
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加调动管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.getBuMen();
+      const id = row.id || this.ids;
+      getTransfer(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改调动管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.form.cName = this.$refs["peopleId"].selectedLabel;
+            updateTransfer(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            this.form.cName = this.$refs["peopleId"].selectedLabel;
+            addTransfer(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm("是否确认删除调动管理的数据项?")
+        .then(function () {
+          return delTransfer(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal
+        .confirm("是否确认导出所有调动管理数据项?")
+        .then(() => {
+          this.exportLoading = true;
+          return exportTransfer(queryParams);
+        })
+        .then((response) => {
+          this.$download.name(response.msg);
+          this.exportLoading = false;
+        })
+        .catch(() => {});
+    },
+    //获取人员基本信息
+    //获取人员基本信息
+    peopleIdfun() {
+      getPeople(this.form.peopleId).then((res) => {
+        if (res.code == 200) {
+          this.form.militaryRank1 = res.data.nowMilitaryRank;
+          this.form.post1 = res.data.postId + "";
+          this.form.unit1 = res.data.deptId;
+        }
+      });
+    },
+  },
+};
+</script>
+  <style scoped>
+::v-deep .el-dialog {
+  width: 1030px !important;
+  background-color: #004d86;
+}
+
+::v-deep .el-dialog__header {
+  border-bottom: 1px solid #718a9d;
+}
+::v-deep .el-dialog__title {
+  color: #fff;
+  font: 18px;
+}
+::v-deep .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+.el-form-item ::v-deep .el-input__inner {
+  width: 200px;
+  height: 36px;
+  background: transparent !important;
+  color: #fff;
+  border: 1px solid #fff !important;
+}
+::v-deep .el-date-editor.el-input {
+  width: 200px;
+  height: 36px;
+}
+::v-deep .el-upload--picture-card {
+  height: 210px;
+  width: 170px;
+  line-height: 210px;
+}
+.el-upload--picture-card /deep/ .el-upload--picture-card i {
+  font-size: 48px;
+}
+::v-deep .el-upload__tip {
+  display: none;
+}
+::v-deep .el-textarea__inner {
+  width: 980px;
+  height: 104px;
+}
+.div-box-title span {
+  width: 25px;
+  height: 25px;
+  display: inline-block;
+  background-color: #1c86e1;
+  line-height: 25px;
+  text-align: center;
+  font-size: 16px;
+  cursor: pointer;
+  margin-left: 865px;
+}
+.el-select-dropdown__item:hover {
+  color: #1c86e1;
+}
+.el-select-dropdown__item {
+  color: #000;
+}
+.el-tree {
+  background-color: #00365f;
+  color: #fff;
+}
+::v-deep .el-tree-node__content:hover {
+  color: #1c86e1;
+}
+::v-deep .el-upload-list--picture-card .el-upload-list__item {
+  height: 210px;
+  width: 170px;
+}
+::v-deep .el-dialog__footer {
+  padding: 20px 30px !important;
+}
+
+::v-deep .box1 .el-form {
+  display: flex;
+}
+::v-deep .box1 .el-form-item {
+  margin-bottom: 0px;
+}
+::v-deep .box1 .el-input__inner{
+    border: transparent !important;
+    width: 200px;
+    height: 30px;
+    text-align: center;
+}
+</style>
+