Browse Source

提交研发人员人工费用统计页面

ljb 10 months ago
parent
commit
cf82d124ef

+ 13 - 0
src/api/yfCostManage/yfCostStatistics/personAllocationList.js

@@ -0,0 +1,13 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/kd-scientific/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}

+ 13 - 0
src/api/yfCostManage/yfCostStatistics/projectAllocationList.js

@@ -0,0 +1,13 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/kd-scientific/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}

+ 13 - 0
src/api/yfCostManage/yfCostStatistics/yfWorkHoursAllocationList.js

@@ -0,0 +1,13 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/kd-scientific/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}

+ 314 - 0
src/option/yfCostManage/yfCostStatistics/personAllocationList.js

@@ -0,0 +1,314 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  addBtn: false,
+  selection: true,
+  searchLabelWidth: 140,
+  labelWidth: 100,
+  menuWidth: 180,
+  menu: false,
+  dialogClickModal: false,
+  dialogWidth: 500,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '研发项目编号',
+      prop: 'xmbh',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目名称',
+      prop: 'xmmc',
+      span: 24,
+      minWidth: 120,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '姓名',
+      prop: 'name',
+      span: 24,
+      search: true,
+      width: 90,
+      align: 'center',
+      type: 'input',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '工号',
+      prop: 'number',
+      type: 'input',
+      span: 24,
+      width: 90,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '身份证号',
+      prop: 'idCard',
+      type: 'input',
+      span: 24,
+      search: true,
+      width: 150,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '科研人员类别',
+      prop: 'personnelType',
+      type: 'select',
+      span: 24,
+      width: 100,
+      align: 'center',
+      search: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=renyuanleixing',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+    },
+    {
+      label: '本月出勤(小时)',
+      prop: 'bycq',
+      span: 24,
+      width: 80,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发出勤(小时)',
+      prop: 'yfcq',
+      span: 24,
+      width: 80,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发占比(%)',
+      prop: 'yfcq',
+      span: 24,
+      width: 80,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '工资薪金',
+      prop: 'gzxj',
+      span: 24,
+      width: 80,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '养老保险单位部分',
+      prop: 'ylbx',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '医疗保险单位部分',
+      prop: 'yiliaobx',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '失业保险单位部分',
+      prop: 'sybx',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '工伤保险单位部分',
+      prop: 'gsbx',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '生育保险单位部分',
+      prop: 'sybx',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '社保合计',
+      prop: 'sbhj',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '公积金',
+      prop: 'gjj',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '奖金',
+      prop: 'jiangjin',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '福利费',
+      prop: 'flf',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '补充养老保险',
+      prop: 'bcylbx',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '补充养老保险',
+      prop: 'bcyiliaobx',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '小计',
+      prop: 'xiaoji',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的工资薪金',
+      prop: 'yfxmfbdhzxj',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的养老保险单位部分',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的医疗保险单位部分',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的失业保险单位部分',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的工伤保险单位部分',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的生育保险单位部分',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的社保合计',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的公积金',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的奖金',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的福利费',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的补充养老保险',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的补充医疗保险',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发费用合计(元)',
+      prop: 'yfxmfpdylbxdwbf',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+  ],
+};

+ 102 - 0
src/option/yfCostManage/yfCostStatistics/projectAllocationList.js

@@ -0,0 +1,102 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  addBtn: false,
+  selection: true,
+  searchLabelWidth: 140,
+  labelWidth: 100,
+  menuWidth: 180,
+  menu: false,
+  dialogClickModal: false,
+  dialogWidth: 500,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '研发项目编号',
+      prop: 'xmbh',
+      span: 24,
+      width: 100,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目名称',
+      prop: 'xmmc',
+      span: 24,
+      minWidth: 160,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的工资薪金',
+      prop: 'hzxj',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的社保',
+      prop: 'shebao',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的公积金',
+      prop: 'gjj',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的奖金',
+      prop: 'jiangjin',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的福利费',
+      prop: 'flf',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的补充养老保险',
+      prop: 'ylbx',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发项目分配的补充医疗保险',
+      prop: 'ylbx',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+    {
+      label: '研发费用合计(元)',
+      prop: 'amount',
+      span: 24,
+      minWidth: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+      search: true,
+    },
+  ],
+};

+ 77 - 0
src/option/yfCostManage/yfCostStatistics/yfWorkHoursAllocationList.js

@@ -0,0 +1,77 @@
+export default {
+  height: 'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  addBtn: false,
+  selection: true,
+  searchLabelWidth: 140,
+  labelWidth: 100,
+  menuWidth: 180,
+  menu: false,
+  dialogClickModal: false,
+  dialogWidth: 500,
+  dialogType: "drawer",
+  column: [
+    {
+      label: '姓名',
+      prop: 'name',
+      span: 24,
+      search: true,
+      width: 90,
+      align: 'center',
+      type: 'input',
+      showOverflowTooltip: true,
+      disabled: true,
+    },
+    {
+      label: '工号',
+      prop: 'number',
+      type: 'input',
+      span: 24,
+      width: 90,
+      align: 'center',
+      search: true,
+      showOverflowTooltip: true,
+      disabled: true,
+    },
+    {
+      label: '身份证号',
+      prop: 'idCard',
+      type: 'input',
+      span: 24,
+      search: true,
+      width: 150,
+      align: 'center',
+      showOverflowTooltip: true,
+      disabled: true,
+    },
+    {
+      label: '科研人员类别',
+      prop: 'personnelType',
+      type: 'select',
+      span: 24,
+      width: 100,
+      align: 'center',
+      search: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=renyuanleixing',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
+      showOverflowTooltip: true,
+      disabled: true,
+    },
+    {
+      label: '类别',
+      prop: 'gslb',
+      span: 24,
+      width: 90,
+      align: 'center',
+      showOverflowTooltip: true,
+    },
+  ],
+};

+ 8 - 1
src/styles/element-ui.scss

@@ -71,13 +71,20 @@
 }
 
 .el-table .el-table__header .el-table__cell {
-  padding: 4px 0;
+  padding: 8px 0;
+}
+.el-table th.el-table__cell>.cell {
+  line-height: 18px;
 }
 
 .el-table .el-table__body .el-table__cell {
   padding: 0 0;
 }
 
+.el-table .el-table__body .el-button--text {
+  padding: 7px 0;
+}
+
 .el-table .cell .el-tag {
   height: 22px !important;
   line-height: 20px !important;

+ 2 - 2
src/views/yf-cost-manage/basic-data-setting/yf-cost-bill.vue

@@ -162,7 +162,7 @@ export default window.$crudCommon({
     },
     handleExport() {
       exportBlob(`/api/kd-scientific//export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `${this.params.yearAndMonth}研发费用支出明细账.xlsx`);
+        downloadXls(res.data, `${this.params.yearAndMonth}企业研发费用支出明细账.xlsx`);
       });
     },
     /**
@@ -171,7 +171,7 @@ export default window.$crudCommon({
      */
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `${this.params.yearAndMonth}研发费用支出明细账`;
+      this.printTitle = `${this.params.yearAndMonth}企业研发费用支出明细账`;
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
       })

+ 99 - 0
src/views/yf-cost-manage/yf-cost-statistics/person-cost-statistics/person-allocation-list.vue

@@ -0,0 +1,99 @@
+<template>
+  <basic-container>
+    <avue-crud
+      v-bind="bindVal"
+      v-on="onEvent"
+      v-model="form"
+      :page.sync="page"
+    >
+      <template slot="menuLeft">
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
+        <print-table-btn @click="printTable" />
+        
+        <div style="display: flex; align-items: center;">
+          <year-month-select v-model="params.yearAndMonth"></year-month-select>
+        </div>
+      </template>
+      
+    </avue-crud>
+
+    <WideTablePrinter
+      ref="printWideTable"
+      :columns="wideTableColumns"
+      :data="data"
+      :print-title="printTitle"
+      :rows-per-page="30"
+      :default-landscape="true"
+    />
+  </basic-container>
+</template>
+
+<script>
+import YearMonthSelect from "@/components/year-month-select";
+import {exportBlob} from "@/api/common";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+import moment from "moment";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYYMM'),
+      },
+
+      wideTableColumns: [],
+      printTitle: "",
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  methods: {
+    loadData() {},
+    handleExport() {
+      exportBlob(`/api/kd-scientific/attendance/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        downloadXls(res.data, `${this.params.yearAndMonth}研发人工分配表.xlsx`);
+      });
+    },
+    /**
+     * 打印表格
+     * @param isLandscape 是否横向打印
+     */
+    printTable(isLandscape) {
+      this.wideTableColumns = this.$refs.crud.columnOption;
+      this.printTitle = `${this.params.yearAndMonth}研发人工分配表.xlsx`;
+      this.$nextTick(() => {
+        this.$refs.printWideTable.printTable(isLandscape);
+      })
+    },
+    headerCellStyle ({ column }) {
+      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
+      return {
+        color
+      }
+    }
+  },
+}, {
+  // 模块路径
+  name: 'yfCostManage/yfCostStatistics/personAllocationList',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>

+ 108 - 0
src/views/yf-cost-manage/yf-cost-statistics/person-cost-statistics/project-allocation-list.vue

@@ -0,0 +1,108 @@
+<template>
+  <basic-container>
+    <avue-crud
+      v-bind="bindVal"
+      v-on="onEvent"
+      v-model="form"
+      :page.sync="page"
+    >
+      <template slot="menuLeft">
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
+        <print-table-btn @click="printTable" />
+        
+        <div style="display: flex; align-items: center;">
+          <year-month-select v-model="params.yearAndMonth"></year-month-select>
+        </div>
+      </template>
+
+      <template slot="amountSearch">
+        <div style="display: flex; align-items: center;">
+          <span>研发费用:</span>
+          <avue-input-number v-model="params.amountMin" :min="0" style="width: 90px !important;"></avue-input-number>
+          <span style="width: 20px; text-align: center;">至</span>
+          <avue-input-number v-model="params.amountMax" :min="0" style="width: 90px !important;"></avue-input-number>
+        </div>
+      </template>
+      
+    </avue-crud>
+
+    <WideTablePrinter
+      ref="printWideTable"
+      :columns="wideTableColumns"
+      :data="data"
+      :print-title="printTitle"
+      :rows-per-page="30"
+      :default-landscape="true"
+    />
+  </basic-container>
+</template>
+
+<script>
+import YearMonthSelect from "@/components/year-month-select";
+import {exportBlob} from "@/api/common";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+import moment from "moment";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYYMM'),
+      },
+
+      wideTableColumns: [],
+      printTitle: "",
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  methods: {
+    loadData() {},
+    handleExport() {
+      exportBlob(`/api/kd-scientific/attendance/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        downloadXls(res.data, `${this.params.yearAndMonth}研发项目人工分配汇总表.xlsx`);
+      });
+    },
+    /**
+     * 打印表格
+     * @param isLandscape 是否横向打印
+     */
+    printTable(isLandscape) {
+      this.wideTableColumns = this.$refs.crud.columnOption;
+      this.printTitle = `${this.params.yearAndMonth}研发项目人工分配汇总表.xlsx`;
+      this.$nextTick(() => {
+        this.$refs.printWideTable.printTable(isLandscape);
+      })
+    },
+    headerCellStyle ({ column }) {
+      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
+      return {
+        color
+      }
+    }
+  },
+}, {
+  // 模块路径
+  name: 'yfCostManage/yfCostStatistics/projectAllocationList',
+  res: ({ data }) => {
+    return data;
+  },
+});
+</script>

+ 190 - 0
src/views/yf-cost-manage/yf-cost-statistics/person-cost-statistics/yf-work-hours-allocation-list.vue

@@ -0,0 +1,190 @@
+<template>
+  <basic-container>
+    <avue-crud
+      v-bind="bindVal"
+      v-on="onEvent"
+      v-model="form"
+      :page.sync="page"
+      :before-open="handleBeforeOpen"
+      :header-cell-style="headerCellStyle" 
+      :span-method="spanMethod"
+    >
+      <template slot="menuLeft">
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+        >
+          导出
+        </el-button>
+        <print-table-btn @click="printTable" />
+        
+        <div style="display: flex; align-items: center;">
+          <year-month-select v-model="params.yearAndMonth" :showAllYear="false"></year-month-select>
+        </div>
+      </template>
+      
+    </avue-crud>
+
+    <WideTablePrinter
+      ref="printWideTable"
+      :columns="wideTableColumns"
+      :data="data"
+      :print-title="printTitle"
+      :rows-per-page="30"
+      :default-landscape="true"
+    />
+  </basic-container>
+</template>
+
+<script>
+import YearMonthSelect from "@/components/year-month-select";
+import {exportBlob} from "@/api/common";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+import { deepClone, getMonthDatesWithMarkers } from "@/util/util";
+import moment from "moment";
+import ChineseHoliday from "@chnlib/chinese-holiday";
+
+
+export default window.$crudCommon({
+  components: {
+    YearMonthSelect,
+  },
+  data() {
+    return {
+      params: {
+        yearAndMonth: moment(new Date()).format('YYYYMM'),
+      },
+      defaultColumns: [],
+
+      wideTableColumns: [],
+      printTitle: "",
+    };
+  },
+  watch: {
+    'params.yearAndMonth'(newVal) {
+      this.refreshTableCol(newVal);
+      this.page.currentPage = 1;
+      this.getList(this.page);
+    }
+  },
+  async created() {
+    this.defaultColumns = deepClone(this.option.column);
+    this.refreshTableCol(this.params.yearAndMonth);
+  },
+  beforeDestroy() {
+    this.option.column = deepClone(this.defaultColumns);
+  },
+  methods: {
+    loadData() {},
+    spanMethod({ row, column, rowIndex, columnIndex }) {
+      let fields = ["xm", "number", "idCard", "personnelType"];
+      let cellValue = row[column.property];
+      if (cellValue && fields.includes(column.property)) {
+        let prevRow = this.data[rowIndex - 1];
+        let nextRow = this.data[rowIndex + 1];
+        if (prevRow && prevRow[column.property] === cellValue) {
+          return { rowspan: 0, colspan: 0 };
+        } else {
+          let countRowspan = 1;
+          while (nextRow && nextRow[column.property] === cellValue) {
+            nextRow = this.data[++countRowspan + rowIndex];
+          }
+          if (countRowspan > 1) {
+            row.hbFlag = true;
+            return { rowspan: countRowspan, colspan: 1 };
+          }
+        }
+      }
+    },
+    refreshTableCol(yearAndMonth) {
+      let yearMonth = moment(yearAndMonth).format("YYYY-MM").split("-");
+      const monthDays = getMonthDatesWithMarkers(Number(yearMonth[0]), Number(yearMonth[1]));
+
+      let newColumns = deepClone(this.defaultColumns);
+
+      monthDays.forEach((item) => {
+        let col = {
+          prop: moment(item.dateString).format('yyyyMMDD'),
+          label: item.dayName + "" + item.day.toString(),
+          type: 'number',
+          precision: 1,
+          min: 0,
+          width: 45,
+          align: 'center',
+          isWorkDay: ChineseHoliday.isWorkday(item.dateString),
+          showOverflowTooltip: true,
+        }
+
+        if (!ChineseHoliday.isWorkday(item.dateString)) {
+          col.labelClassName = 'red';
+          col.labelClassName = 'red';
+        }
+        newColumns.push(col);
+      });
+      newColumns.push({
+        prop: "hj",
+        label: "合计",
+        width: 60,
+        align: 'center',
+        showOverflowTooltip: true,
+        display: false,
+      }, {
+        prop: "gsfpl",
+        label: "工时分配率",
+        width: 60,
+        align: 'center',
+        showOverflowTooltip: true,
+        display: false,
+      });
+
+      this.option.column = newColumns;
+    },
+    handleExport() {
+      exportBlob(`/api/kd-scientific/attendance/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        downloadXls(res.data, `${this.params.yearAndMonth}研发工时分配表.xlsx`);
+      });
+    },
+    /**
+     * 打印表格
+     * @param isLandscape 是否横向打印
+     */
+    printTable(isLandscape) {
+      this.wideTableColumns = this.$refs.crud.columnOption;
+      this.printTitle = `${this.params.yearAndMonth}研发工时分配表.xlsx`;
+      this.$nextTick(() => {
+        this.$refs.printWideTable.printTable(isLandscape);
+      })
+    },
+    headerCellStyle ({ column }) {
+      let color = column.labelClassName ? 'red' : 'rgba(0,0,0,.85)';
+      return {
+        color
+      }
+    }
+  },
+}, {
+  // 模块路径
+  name: 'yfCostManage/yfCostStatistics/yfWorkHoursAllocationList',
+  res: ({ data }) => {
+    let newList = [];
+    data.records.forEach((item) => {
+      let objData = {
+        ...item,
+        id: item.unicode,
+        monthlyHours: (item.monthlyHours || 0).toFixed(1),
+        monthlyDays: (item.monthlyDays || 0).toFixed(1)
+      };
+      item.dailyAttendances.forEach(hourItem => {
+        objData[hourItem.workDate] = (hourItem.workHours || 0).toFixed(1);
+      });
+      newList.push(objData);
+    });
+    data.records = newList;
+    return data;
+  },
+});
+</script>