Browse Source

Merge branch 'kd-dev' of https://gitee.com/zhoulisky/kd-web into kd-dev

zhoulisky 11 months ago
parent
commit
3e408bdf55

+ 51 - 0
src/api/highTechPersonSumList.js

@@ -0,0 +1,51 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/kd-scientific/technician/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/kd-scientific/technician/save',
+    method: 'post',
+    data: row
+  })
+}
+
+
+export const update = (row) => {
+  return request({
+    url: '/api/kd-scientific/technician/update',
+    method: 'post',
+    data: row
+  })
+}
+
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/kd-scientific/technician/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const getLastMonthData = params => {
+  return request({
+    url: '/kd-scientific/technician/fetchLastMonthData',
+    method: 'get',
+    params: {
+      ...params,
+    }
+  })
+}

+ 5 - 5
src/api/technicianMonthAvgSales.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/api/kd-scientific/technician/page',
+    url: '/api/kd-scientific/salary/page',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const add = (row) => {
   return request({
-    url: '/api/kd-scientific/technician/save',
+    url: '/api/kd-scientific/salary/save',
     method: 'post',
     data: row
   })
@@ -23,7 +23,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/api/kd-scientific/technician/update',
+    url: '/api/kd-scientific/salary/update',
     method: 'post',
     data: row
   })
@@ -32,7 +32,7 @@ export const update = (row) => {
 
 export const remove = (ids) => {
   return request({
-    url: '/api/kd-scientific/technician/remove',
+    url: '/api/kd-scientific/salary/remove',
     method: 'post',
     params: {
       ids,
@@ -42,7 +42,7 @@ export const remove = (ids) => {
 
 export const getLastMonthData = params => {
   return request({
-    url: '/kd-scientific/technician/fetchLastMonthData',
+    url: '/kd-scientific/salary/fetchLastMonthData',
     method: 'get',
     params: {
       ...params,

+ 408 - 0
src/option/highTechPersonSumList.js

@@ -0,0 +1,408 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  addBtn: false,
+  viewBtn: true,
+  selection: true,
+  searchLabelWidth: 140,
+  labelWidth: 140,
+  menuWidth: 220,
+  dialogClickModal: false,
+  dialogWidth: 760,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '姓名',
+      prop: 'name',
+      type: 'input',
+      span: 12,
+      search: true,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入姓名',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '工号',
+      prop: 'number',
+      type: 'input',
+      span: 12,
+      width: 160,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+      // rules: [
+      //   {
+      //     required: true,
+      //     message: '请输入工号',
+      //     trigger: 'blur',
+      //   },
+      // ],
+    },
+    {
+      label: '身份证号',
+      prop: 'identityCard',
+      type: 'input',
+      span: 12,
+      search: true,
+      width: 160,
+      align: 'center',
+      showOverflowTooltip: true,
+      // rules: [
+      //   {
+      //     required: true,
+      //     message: '请输入身份证号',
+      //     trigger: 'blur',
+      //   },
+      // ],
+    },
+    {
+      label: '性别',
+      prop: 'gender',
+      type: 'select',
+      dicUrl: '/api/kd-system/dict/dictionary?code=sex',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      span: 12,
+      width: 50,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择性别',
+          trigger: 'change',
+        },
+      ],
+    },
+    {
+      label: '出生日期',
+      prop: 'birthday',
+      type: 'date',
+      valueFormat: 'yyyy-MM-DD',
+      span: 12,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择出生日期',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '民族',
+      prop: 'ethnic',
+      type: 'input',
+      span: 12,
+      width: 120,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入民族',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '所属二级单位',
+      prop: 'secondaryUnit',
+      type: 'input',
+      span: 12,
+      width: 140,
+      search: true,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入所属二级单位',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '部门/科室/项目部',
+      prop: 'department',
+      type: 'input',
+      span: 12,
+      width: 140,
+      search: true,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入部门/科室/项目部',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '岗位职务',
+      prop: 'post',
+      type: 'input',
+      span: 12,
+      width: 100,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入岗位职务',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '岗位所在地',
+      prop: 'postLocation',
+      type: 'input',
+      span: 12,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入岗位所在地',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '用工性质',
+      prop: 'nature',
+      type: 'select',
+      span: 12,
+      width: 80,
+      align: 'center',
+      search: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=yonggongxingzhi',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择用工性质',
+          trigger: 'change',
+        },
+      ],
+    },
+    {
+      label: '入职时间',
+      prop: 'hireDate',
+      type: 'datetime',
+      valueFormat: 'yyyy-MM-dd HH:mm:ss',
+      span: 12,
+      width: 140,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择入职时间',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '最高学历',
+      prop: 'education',
+      type: 'select',
+      span: 12,
+      width: 100,
+      align: 'center',
+      search: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=xueli',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择最高学历',
+          trigger: 'change',
+        },
+      ],
+    },
+    {
+      label: '最高学位',
+      prop: 'degree',
+      type: 'select',
+      span: 12,
+      width: 90,
+      align: 'center',
+      search: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=xuewei',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择最高学位',
+          trigger: 'change',
+        },
+      ],
+    },
+    {
+      label: '最高学历学校',
+      prop: 'schoolName',
+      type: 'input',
+      span: 12,
+      width: 160,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入最高学历学校',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '最高学历专业名称',
+      prop: 'major',
+      type: 'input',
+      span: 12,
+      width: 140,
+      align: 'center',
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入最高学历专业名称',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '职称',
+      prop: 'rank',
+      type: 'select',
+      span: 12,
+      width: 120,
+      align: 'center',
+      search: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=zhicheng',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择职称',
+          trigger: 'change',
+        },
+      ],
+    },
+    {
+      label: '职业资格',
+      prop: 'practicingRequirement',
+      type: 'input',
+      span: 12,
+      width: 100,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入职业资格',
+          trigger: 'blur',
+        },
+      ],
+    },
+    {
+      label: '参研情况',
+      prop: 'situation',
+      type: 'select',
+      span: 12,
+      width: 100,
+      align: 'center',
+      search: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=canyanqingkuang',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择参研情况',
+          trigger: 'change',
+        },
+      ],
+    },
+    {
+      label: '人员类型',
+      prop: 'personnelType',
+      type: 'select',
+      span: 12,
+      width: 100,
+      align: 'center',
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=renyuanleixing',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择人员类型',
+          trigger: 'change',
+        },
+      ],
+    },
+    {
+      label: '本年度从事研发工作天数',
+      prop: 'yfts',
+      type: 'number',
+      span: 12,
+      width: 170,
+      align: 'center',
+      fixed: 'right',
+      showOverflowTooltip: true,
+      editDisplay: false,
+      rules: [
+        {
+          required: true,
+          message: '请输入本年度从事研发工作天数',
+          trigger: 'change',
+        },
+      ],
+    },
+  ],
+};

+ 60 - 32
src/option/technicianMonthAvgSales.js

@@ -9,10 +9,10 @@ export default {
   viewBtn: true,
   selection: true,
   searchLabelWidth: 140,
-  labelWidth: 140,
+  labelWidth: 255,
   menuWidth: 220,
   dialogClickModal: false,
-  dialogWidth: 760,
+  dialogWidth: 500,
   dialogType: "drawer",
   column: [
     {
@@ -54,7 +54,7 @@ export default {
       prop: 'number',
       type: 'input',
       span: 24,
-      width: 160,
+      width: 120,
       align: 'center',
       search: true,
       disabled: true,
@@ -76,9 +76,10 @@ export default {
       prop: 'department',
       type: 'input',
       span: 24,
-      width: 140,
+      width: 120,
       search: true,
       disabled: true,
+      align: 'center',
       showOverflowTooltip: true,
     },
     {
@@ -99,76 +100,103 @@ export default {
     },
     {
       label: '上一年度月均工资(元)',
-      prop: 'yjgz',
+      prop: 'averageMonthlySalary',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 90,
+      align: 'center',
       showOverflowTooltip: true,
     },
     {
-      label: '上一年度月均工资(元)',
-      prop: 'yjgz',
+      label: '上一年度月均单位承担部分养老保险',
+      prop: 'pensionInsurance',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 100,
+      align: 'center',
       showOverflowTooltip: true,
     },
     {
-      label: '上一年度月均单位承担部分医疗保险(元)',
-      prop: 'ylbx',
+      label: '上一年度月均单位承担部分医疗保险',
+      prop: 'medicalInsurance',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 90,
+      align: 'center',
       showOverflowTooltip: true,
     },
     {
-      label: '上一年度月均单位承担部分失业保险(元)',
-      prop: 'yjgz',
+      label: '上一年度月均单位承担部分失业保险',
+      prop: 'unemploymentInsurance',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 90,
+      align: 'center',
       showOverflowTooltip: true,
     },
     {
-      label: '上一年度月均单位承担部分工伤保险(元)',
-      prop: 'gsbx',
+      label: '上一年度月均单位承担部分工伤保险',
+      prop: 'injuryInsurance',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '上一年度月均单位承担部分生育保险',
+      prop: 'maternityInsurance',
+      type: 'number',
+      min: 0,
+      precision: 2,
+      span: 24,
+      width: 90,
+      align: 'center',
       showOverflowTooltip: true,
     },
     {
       label: '上一年度月均单位承担部分社保合计(元)',
-      prop: 'sbhj',
+      prop: 'socialInsurance',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 90,
+      align: 'center',
       addDisplay: false,
       editDisplay: false,
       showOverflowTooltip: true,
     },
     {
       label: '上一年度月均单位承担部分公积金(元)',
-      prop: 'gjj',
+      prop: 'providentFund',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 90,
+      align: 'center',
       showOverflowTooltip: true,
     },
     {
       label: '合计(元)',
-      prop: 'bxhj',
+      prop: 'total',
       type: 'number',
+      min: 0,
+      precision: 2,
       span: 24,
-      width: 160,
-      align: 'right',
+      width: 100,
+      align: 'center',
       addDisplay: false,
       editDisplay: false,
       showOverflowTooltip: true,

+ 1 - 1
src/store/modules/common.js

@@ -25,7 +25,7 @@ const common = {
     showMenu: true,
     showColor: true,
     colorName: getStore({name: 'colorName'}) || '#409EFF',
-    themeName: getStore({name: 'themeName'}) || 'theme-hey',
+    themeName: getStore({name: 'themeName'}) || 'theme-blue',
     lockPasswd: getStore({name: 'lockPasswd'}) || '',
     website: website,
   },

+ 167 - 0
src/views/high-tech-person-sum-list/index.vue

@@ -0,0 +1,167 @@
+<template>
+  <basic-container>
+    <avue-crud
+      v-bind="bindVal"
+      v-on="onEvent"
+      v-model="form"
+      :page.sync="page"
+      :before-open="handleBeforeOpen"
+      :permission="permissionList"
+    >
+      <template slot="menuLeft">
+        <el-button
+          type="success"
+          size="small"
+          plain
+          icon="el-icon-upload2"
+          @click="handleImport"
+        >
+          导入
+        </el-button>
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
+        <el-button
+          type="danger"
+          size="small"
+          icon="el-icon-delete"
+          plain
+          @click="handleDelete"
+        >
+          删 除
+        </el-button>
+        <div>
+          <year-month-select v-model="params.yearAndMonth" :showMonth="false"></year-month-select>
+        </div>
+      </template>
+      
+    </avue-crud>
+
+    <el-dialog title="年度高新科技人员导入"
+      append-to-body
+      :visible.sync="excelBox"
+      width="555px"
+    >
+      <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="handleTemplate">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+    </el-dialog>
+  </basic-container>
+</template>
+
+<script>
+import {exportBloByPost} from "@/api/common";
+import YearMonthSelect from "@/components/year-month-select";
+import moment from "moment";
+import NProgress from 'nprogress';
+import 'nprogress/nprogress.css';
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYY'),
+      },
+      excelBox: false,
+      excelForm: {},
+      
+      isSelAnnual: false, // 是否选择全年
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  computed: {
+    excelOption() {
+      return {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: '模板上传',
+            prop: 'excelFile',
+            type: 'upload',
+            drag: true,
+            loadText: '模板上传中,请稍等',
+            span: 24,
+            propsHttp: {
+              res: 'data'
+            },
+            data: {
+              yearAndMonth: this.params.yearAndMonth,
+            },
+            tip: '请上传 .xls,.xlsx 标准格式文件',
+            action: '/api/kd-scientific/technician/import'
+          },
+          {
+            label: '模板下载',
+            prop: 'excelTemplate',
+            formslot: true,
+            span: 24,
+          }
+        ]
+      }    
+    },
+  },
+  methods: {
+    handleImport() {
+      this.excelBox = true;
+      this.excelForm.yearAndMonth = this.params.yearAndMonth;
+    },
+    uploadAfter(res, done, loading, column) {
+      this.excelBox = false;
+      this.page.currentPage = 1;
+      this.getList(this.page);
+      done();
+    },
+    handleExport() {
+      this.$confirm("是否导出?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        NProgress.start();
+        exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+          downloadXls(res.data, `${this.params.yearAndMonth}年度高新科技人员汇总表.xlsx`);
+          NProgress.done();
+        })
+      });
+    },
+    handleTemplate() {
+      this.$message.warning("暂未配置模板");
+      // exportBlob(`/api/kd-system/region/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
+      //   downloadXls(res.data, "技术人员花名册.xlsx");
+      // });
+    },
+  },
+}, {
+  // 模块路径
+  name: 'highTechPersonSumList',
+  res: ({ data }) => {
+    data.records = data.records.map(item => {
+      item.gender = item.gender ? String(item.gender) : '';
+      return item;
+    });
+    return data;
+  },
+});
+</script>

+ 1 - 1
src/views/technician-month-avg-sales/index.vue

@@ -206,7 +206,7 @@ export default window.$crudCommon({
         type: "warning"
       }).then(() => {
         NProgress.start();
-        exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        exportBloByPost(`/api/kd-scientific/salary/export-salary?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
           downloadXls(res.data, `技术人员上一年度平均工资${this.params.yearAndMonth}.xlsx`);
           NProgress.done();
         })