Browse Source

完成资产清单汇总表

ljb 11 months ago
parent
commit
4ae40f0d01

+ 52 - 325
src/option/deviceManage/yfCostShareSummaryList.js

@@ -6,7 +6,8 @@ export default {
   searchMenuSpan: 6,
   border: true,
   index: true,
-  viewBtn: true,
+  addBtn: false,
+  menu: false,
   selection: true,
   searchLabelWidth: 140,
   labelWidth: 140,
@@ -14,385 +15,111 @@ export default {
   dialogClickModal: false,
   dialogWidth: 760,
   dialogType: "drawer",
-  column: [
+  showSummary: true,
+  sumColumnList: [
     {
-      label: '姓名',
-      prop: 'name',
-      type: 'input',
-      span: 12,
-      search: true,
-      width: 100,
-      align: 'center',
-      showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入姓名',
-          trigger: 'blur',
-        },
-      ],
+      label:'合计',
+      name: 'xmbh',
+      decimals:1
     },
     {
-      label: '工号',
-      prop: 'number',
-      type: 'input',
-      span: 12,
-      width: 160,
-      align: 'center',
-      search: true,
-      showOverflowTooltip: true,
-      // rules: [
-      //   {
-      //     required: true,
-      //     message: '请输入工号',
-      //     trigger: 'blur',
-      //   },
-      // ],
+      name: 'sbzjf',
+      type: 'sum',
     },
     {
-      label: '身份证号',
-      prop: 'identityCard',
-      type: 'input',
-      span: 12,
-      search: true,
-      width: 160,
-      align: 'center',
-      showOverflowTooltip: true,
-      // rules: [
-      //   {
-      //     required: true,
-      //     message: '请输入身份证号',
-      //     trigger: 'blur',
-      //   },
-      // ],
+      name: 'jzwzjf',
+      type: 'sum'
     },
     {
-      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',
-        },
-      ],
+      name: 'rjtxf',
+      type: 'sum'
     },
     {
-      label: '出生日期',
-      prop: 'birthday',
-      type: 'date',
-      valueFormat: 'yyyy-MM-DD',
-      span: 12,
-      width: 90,
-      align: 'center',
-      showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请选择出生日期',
-          trigger: 'blur',
-        },
-      ],
+      name: 'zlqtxf',
+      type: 'sum'
     },
     {
-      label: '民族',
-      prop: 'ethnic',
-      type: 'input',
-      span: 12,
-      width: 120,
-      align: 'center',
-      showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入民族',
-          trigger: 'blur',
-        },
-      ],
+      name: 'yffytxf',
+      type: 'sum'
     },
     {
-      label: '所属二级单位',
-      prop: 'secondaryUnit',
-      type: 'input',
-      span: 12,
-      width: 140,
-      search: true,
-      align: 'center',
-      showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入所属二级单位',
-          trigger: 'blur',
-        },
-      ],
-    },
+      name: 'total',
+      type: 'sum'
+    }
+  ],
+  column: [
     {
-      label: '部门/科室/项目部',
-      prop: 'department',
+      label: '研发项目编号',
+      prop: 'xmbh',
       type: 'input',
-      span: 12,
-      width: 140,
       search: true,
+      width: 140,
       align: 'center',
       showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入部门/科室/项目部',
-          trigger: 'blur',
-        },
-      ],
     },
     {
-      label: '岗位职务',
-      prop: 'post',
+      label: '研发项目名称',
+      prop: 'xmmc',
       type: 'input',
-      span: 12,
-      width: 100,
-      align: 'center',
+      width: 160,
       search: true,
       showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入岗位职务',
-          trigger: 'blur',
-        },
-      ],
     },
     {
-      label: '岗位所在地',
-      prop: 'postLocation',
+      label: '月份',
+      prop: 'month',
       type: 'input',
-      span: 12,
-      width: 100,
-      search: true,
-      align: 'center',
-      showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入岗位所在地',
-          trigger: 'blur',
-        },
-      ],
-    },
-    {
-      label: '用工性质',
-      prop: 'nature',
-      type: 'select',
-      span: 12,
-      width: 80,
+      width: 60,
       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',
+      label: '研发项目分配的仪器设备折旧费',
+      prop: 'sbzjf',
       type: 'input',
-      span: 12,
-      width: 160,
+      minWidth: 120,
       align: 'center',
       showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入最高学历学校',
-          trigger: 'blur',
-        },
-      ],
     },
     {
-      label: '最高学历专业名称',
-      prop: 'major',
+      label: '研发项目分配的房屋建筑物折旧费',
+      prop: 'jzwzjf',
       type: 'input',
-      span: 12,
-      width: 140,
+      minWidth: 120,
       align: 'center',
       showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入最高学历专业名称',
-          trigger: 'blur',
-        },
-      ],
     },
     {
-      label: '职称',
-      prop: 'rank',
-      type: 'select',
-      span: 12,
-      width: 120,
+      label: '研发项目分配的软件摊销费',
+      prop: 'rjtxf',
+      type: 'input',
+      minWidth: 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',
+      label: '研发项目分配的专利权摊销费',
+      prop: 'zlqtxf',
       type: 'input',
-      span: 12,
-      width: 100,
+      minWidth: 120,
       align: 'center',
       showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请输入职业资格',
-          trigger: 'blur',
-        },
-      ],
-    },
-    {
-      label: '其他说明',
-      prop: 'remark',
-      type: 'textarea',
-      span: 24,
-      minWidth: 160,
-      showOverflowTooltip: true,
     },
     {
-      label: '参研情况',
-      prop: 'situation',
-      type: 'select',
-      span: 12,
-      width: 100,
+      label: '研发项目分配的非专利技术摊销费',
+      prop: 'yffytxf',
+      type: 'input',
+      minWidth: 120,
       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,
+      label: '合计',
+      prop: 'total',
+      type: 'input',
+      minWidth: 90,
       align: 'center',
-      search: true,
-      dicUrl: '/api/kd-system/dict-biz/dictionary?code=renyuanleixing',
-      props: {
-        label: 'dictValue',
-        value: 'dictKey',
-      },
       showOverflowTooltip: true,
-      rules: [
-        {
-          required: true,
-          message: '请选择人员类型',
-          trigger: 'change',
-        },
-      ],
     },
   ],
 };

+ 1 - 14
src/views/device-manage/device-work-hours-record-list.vue

@@ -66,9 +66,6 @@ export default window.$crudCommon({
       params: {
         yearAndMonth: moment(new Date()).format('YYYYMM'),
       },
-      isSelAnnual: false, // 是否选择全年
-      data: [{}],
-
       defaultColumns: [],
 
       wideTableColumns: [],
@@ -77,13 +74,6 @@ export default window.$crudCommon({
   },
   watch: {
     'params.yearAndMonth'(newVal) {
-      if (newVal.length > 4) {
-        // 是否勾选未全年
-        this.isSelAnnual = false;
-      } else {
-        this.isSelAnnual = true;
-      }
-
       this.refreshTableCol(newVal);
       this.page.currentPage = 1;
       this.getList(this.page);
@@ -116,16 +106,13 @@ export default window.$crudCommon({
 
       this.option.column = newColumns;
     },
-    getList() {
-      this.loading = false;
-    },
     /**
      * 打印表格
      * @param isLandscape 是否横向打印
      */
     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);
       })

+ 1 - 112
src/views/device-manage/yf-cost-share-summary-list.vue

@@ -10,26 +10,6 @@
     >
       <template slot="menuLeft">
         <el-button
-          v-if="!isSelAnnual"
-          type="danger"
-          size="small"
-          icon="el-icon-delete"
-          plain
-          @click="handleDelete"
-        >
-          删 除
-        </el-button>
-        <el-button
-          v-if="!isSelAnnual"
-          type="success"
-          size="small"
-          plain
-          icon="el-icon-upload2"
-          @click="handleImport"
-        >
-          导入
-        </el-button>
-        <el-button
           type="warning"
           size="small"
           plain
@@ -38,15 +18,6 @@
         >
           导出
         </el-button>
-        <el-button
-          v-if="!isSelAnnual"
-          type="primary"
-          size="small"
-          plain
-          @click="handleReadyLastMonData"
-        >
-          读取上个月人员名单
-        </el-button>
         <print-table-btn @click="printTable" />
         
         <div style="display: flex; align-items: center;">
@@ -70,13 +41,9 @@
 </template>
 
 <script>
-import { getLastMonthData } from "@/api/basicResource/technicianRoster";
-import {exportBloByPost} from "@/api/common";
 import YearMonthSelect from "@/components/year-month-select";
 import UploadExcelDialog from "@/components/upload-excel-dialog";
 import moment from "moment";
-import {getToken} from "@/util/auth";
-import {downloadXls} from "@/util/util";
 
 
 export default window.$crudCommon({
@@ -107,92 +74,14 @@ export default window.$crudCommon({
       this.getList(this.page);
     }
   },
-  computed: {
-    permissionList() {
-      return {
-        addBtn: !this.isSelAnnual,
-        editBtn: !this.isSelAnnual,
-        delBtn: !this.isSelAnnual,
-      };
-    },
-  },
   methods: {
-    getList() {
-      this.loading = false;
-    },
-    validCustom() {
-      if (!this.form.number && !this.form.identityCard) {
-        this.$message.warning("工号和身份证号必须填写一项!");
-        return false;
-      }
-      return true;
-    },
-    addBefore(loading, callback) {
-      if (!this.validCustom()) {
-        loading();
-        return;
-      }
-      callback && callback();
-    },
-    updateBefore(loading, callback) {
-      if (!this.validCustom()) {
-        loading();
-        return false;
-      }
-      callback && callback();
-    },
-    getDelParams(row) {
-      return [{ id: row.id, yearAndMonth: this.params.yearAndMonth }];
-    },
-    getBatchDelParams() {
-      let delArr = [];
-      this.data.forEach(item => {
-        if (this.ids.indexOf(item.id) > -1) {
-          delArr.push({ yearAndMonth: this.params.yearAndMonth, id: item.id });
-        }
-      });
-      return delArr;
-    },
-    handleImport() {
-      let excelParams = { yearAndMonth: this.params.yearAndMonth };
-      this.$refs.uploadExcelDialog.open('/api/kd-scientific/technician/import', excelParams);
-    },
-    uploadAfter() {
-      this.page.currentPage = 1;
-      this.getList(this.page);
-    },
-    handleExport() {
-      exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `技术人员花名册${this.params.yearAndMonth}.xlsx`);
-      });
-    },
-    handleTemplate() {
-      this.$message.warning("暂未配置模板");
-    },
-    handleReadyLastMonData() {
-      this.$confirm("确认要读取上个月的数据吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        getLastMonthData({ yearAndMonth: this.params.yearAndMonth}).then(res => {
-          let data = res.data;
-          if (data.success) {
-
-            this.$message.success('读取成功!');
-            this.page.currentPage = 1;
-            this.getList(this.page);
-          }
-        });
-      });
-    },
     /**
      * 打印表格
      * @param isLandscape 是否横向打印
      */
     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);
       })