Browse Source

部分页面打印配置

ljb 8 months ago
parent
commit
dd929c9512

+ 1 - 1
src/components/print-wide-table/index.vue

@@ -78,7 +78,7 @@
           </thead> -->
           </thead> -->
            <thead>
            <thead>
             <tr v-for="(row, rowIndex) in headerRows" :key="'row-' + rowIndex">
             <tr v-for="(row, rowIndex) in headerRows" :key="'row-' + rowIndex">
-              <th style="width: 50px;">序号</th>
+              <th v-if="rowIndex == 0" style="width: 50px;" :rowspan="headerRows.length">序号</th>
               <th 
               <th 
                 v-for="(col, colIndex) in row" 
                 v-for="(col, colIndex) in row" 
                 :key="'col-' + colIndex"
                 :key="'col-' + colIndex"

+ 4 - 110
src/printOption/techPerson/cyPersonRoster.js

@@ -1,21 +1,4 @@
 export default {
 export default {
-  height: 'auto',
-  calcHeight: 30,
-  tip: false,
-  searchShow: true,
-  searchMenuSpan: 6,
-  border: true,
-  index: true,
-  viewBtn: true,
-  addBtn: false,
-  delBtn: false,
-  menu: false,
-  searchLabelWidth: 140,
-  labelWidth: 140,
-  menuWidth: 160,
-  dialogClickModal: false,
-  dialogWidth: 760,
-  dialogType: "drawer",
   column: [
   column: [
     {
     {
       label: '技术人员花名册',
       label: '技术人员花名册',
@@ -24,106 +7,56 @@ export default {
       children: [{
       children: [{
         label: '姓名',
         label: '姓名',
         prop: 'name',
         prop: 'name',
-        type: 'input',
-        span: 12,
-        search: true,
-        width: 80,
+        width: 90,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '工号',
         label: '工号',
         prop: 'number',
         prop: 'number',
-        type: 'input',
-        span: 12,
-        width: 90,
+        width: 80,
         align: 'center',
         align: 'center',
-        search: true,
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '身份证号',
         label: '身份证号',
         prop: 'idCard',
         prop: 'idCard',
-        type: 'input',
-        span: 12,
-        search: true,
-        width: 150,
+        width: 140,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '所属二级单位/部门',
         label: '所属二级单位/部门',
         prop: 'department',
         prop: 'department',
-        type: 'input',
-        span: 12,
         width: 180,
         width: 180,
-        search: true,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '岗位职务',
         label: '岗位职务',
         prop: 'post',
         prop: 'post',
-        type: 'input',
-        span: 12,
         width: 80,
         width: 80,
         align: 'center',
         align: 'center',
-        search: true,
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '岗位所在地',
         label: '岗位所在地',
         prop: 'postLocation',
         prop: 'postLocation',
-        type: 'input',
-        span: 12,
         width: 90,
         width: 90,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '用工性质',
         label: '用工性质',
         prop: 'nature',
         prop: 'nature',
-        type: 'select',
-        span: 12,
         width: 70,
         width: 70,
         align: 'center',
         align: 'center',
-        search: true,
-        dicUrl: '/api/kd-system/dict/dictionary?code=yonggongxingzhi',
-        props: {
-          label: 'dictValue',
-          value: 'dictKey',
-        },
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '参研情况',
         label: '参研情况',
         prop: 'situation',
         prop: 'situation',
-        type: 'select',
-        span: 12,
         width: 70,
         width: 70,
         align: 'center',
         align: 'center',
-        search: true,
-        dicUrl: '/api/kd-system/dict/dictionary?code=canyanqingkuang',
-        props: {
-          label: 'dictValue',
-          value: 'dictKey',
-        },
-        showOverflowTooltip: true,
       },
       },
       {
       {
         label: '人员类型',
         label: '人员类型',
         prop: 'personnelType',
         prop: 'personnelType',
-        type: 'select',
-        span: 12,
         width: 70,
         width: 70,
         align: 'center',
         align: 'center',
-        search: true,
-        dicUrl: '/api/kd-system/dict/dictionary?code=renyuanleixing',
-        props: {
-          label: 'dictValue',
-          value: 'dictKey',
-        },
-        showOverflowTooltip: true,
       }]
       }]
     },
     },
     {
     {
@@ -133,18 +66,12 @@ export default {
       children: [{
       children: [{
         label: '参与的研发项目',
         label: '参与的研发项目',
         prop: 'cyxm',
         prop: 'cyxm',
-        span: 12,
-        width: 300,
-        showOverflowTooltip: true,
+        width: 240,
       }, {
       }, {
         label: '参研个数',
         label: '参研个数',
         prop: 'situationCount',
         prop: 'situationCount',
-        type: 'number',
-        span: 12,
         width: 70,
         width: 70,
         align: 'center',
         align: 'center',
-        search: true,
-        showOverflowTooltip: true,
       }]
       }]
     },
     },
     {
     {
@@ -154,106 +81,73 @@ export default {
       children: [{
       children: [{
         label: '1月',
         label: '1月',
         prop: '1',
         prop: '1',
-        type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '2月',
         label: '2月',
         prop: '2',
         prop: '2',
-        type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '3月',
         label: '3月',
         prop: '3',
         prop: '3',
-        type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '4月',
         label: '4月',
         prop: '4',
         prop: '4',
-        type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '5月',
         label: '5月',
         prop: '5',
         prop: '5',
-        type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '6月',
         label: '6月',
         prop: '6',
         prop: '6',
-        type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '7月',
         label: '7月',
         prop: '7',
         prop: '7',
-        type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '8月',
         label: '8月',
         prop: '8',
         prop: '8',
         type: 'number',
         type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '9月',
         label: '9月',
         prop: '9',
         prop: '9',
         type: 'number',
         type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '10月',
         label: '10月',
         prop: '10',
         prop: '10',
         type: 'number',
         type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '11月',
         label: '11月',
         prop: '11',
         prop: '11',
         type: 'number',
         type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '12月',
         label: '12月',
         prop: '12',
         prop: '12',
         type: 'number',
         type: 'number',
-        span: 12,
         width: 50,
         width: 50,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }, {
       }, {
         label: '天数合计',
         label: '天数合计',
         prop: 'total',
         prop: 'total',
-        display: false,
         width: 70,
         width: 70,
         align: 'center',
         align: 'center',
-        showOverflowTooltip: true,
       }]
       }]
     },
     },
   ],
   ],

+ 9 - 7
src/views/basic-resource/comp-basic-info/ky-asset-list.vue

@@ -95,7 +95,7 @@
       ref="printWideTable"
       ref="printWideTable"
       :columns="wideTableColumns"
       :columns="wideTableColumns"
       :data="wideTableData"
       :data="wideTableData"
-      :print-title="printTitle"
+      :print-title="pageTitle"
       :rows-per-page="30"
       :rows-per-page="30"
       :default-landscape="true"
       :default-landscape="true"
       :zoom="80"
       :zoom="80"
@@ -155,6 +155,13 @@ export default window.$crudCommon({
         delBtn: !this.isSelAnnual,
         delBtn: !this.isSelAnnual,
       };
       };
     },
     },
+    pageTitle() {
+      let yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年MM月");
+      if (this.isSelAnnual) {
+        yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年");
+      }
+      return `${yearAndMonthCN}科研资产清单`;
+    }
   },
   },
   mounted() {
   mounted() {
     let newOption = { ...this.option };
     let newOption = { ...this.option };
@@ -252,7 +259,7 @@ export default window.$crudCommon({
     },
     },
     handleExport() {
     handleExport() {
       exportBloByPost(`/api/kd-scientific/asset/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
       exportBloByPost(`/api/kd-scientific/asset/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `科研资产清单${this.params.yearAndMonth}.xlsx`);
+        downloadXls(res.data, `${this.pageTitle}.xlsx`);
       });
       });
     },
     },
     handleReadyLastMonData() {
     handleReadyLastMonData() {
@@ -304,11 +311,6 @@ export default window.$crudCommon({
     printTable(isLandscape) {
     printTable(isLandscape) {
       this.wideTableColumns = this.printOption.column;
       this.wideTableColumns = this.printOption.column;
       this.wideTableData = this.$refs.crud.list
       this.wideTableData = this.$refs.crud.list
-      let yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年MM月");
-      if (this.isSelAnnual) {
-        yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年");
-      }
-      this.printTitle = `${yearAndMonthCN}科研资产清单`;
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       })
       })

+ 11 - 9
src/views/basic-resource/comp-basic-info/technician-roster.vue

@@ -80,7 +80,7 @@
       ref="printWideTable"
       ref="printWideTable"
       :columns="wideTableColumns"
       :columns="wideTableColumns"
       :data="wideTableData"
       :data="wideTableData"
-      :print-title="printTitle"
+      :print-title="pageTitle"
       :rows-per-page="30"
       :rows-per-page="30"
       :default-landscape="true"
       :default-landscape="true"
       :zoom="60"
       :zoom="60"
@@ -130,7 +130,7 @@ export default window.$crudCommon({
       }
       }
       this.page.currentPage = 1;
       this.page.currentPage = 1;
       this.getList(this.page);
       this.getList(this.page);
-    }
+    },
   },
   },
   computed: {
   computed: {
     currYear() {
     currYear() {
@@ -143,6 +143,13 @@ export default window.$crudCommon({
         delBtn: !this.isSelAnnual,
         delBtn: !this.isSelAnnual,
       };
       };
     },
     },
+    pageTitle() {
+      let yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年MM月");
+      if (this.isSelAnnual) {
+        yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年");
+      }
+      return `${yearAndMonthCN}技术人员花名册`;
+    }
   },
   },
   methods: {
   methods: {
     getSearchParams() {
     getSearchParams() {
@@ -213,7 +220,7 @@ export default window.$crudCommon({
     },
     },
     handleExport() {
     handleExport() {
       exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
       exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `技术人员花名册${this.params.yearAndMonth}.xlsx`);
+        downloadXls(res.data, `${this.pageTitle}.xlsx`);
       });
       });
     },
     },
     handleReadyLastMonData() {
     handleReadyLastMonData() {
@@ -240,12 +247,7 @@ export default window.$crudCommon({
     printTable(isLandscape) {
     printTable(isLandscape) {
       this.wideTableColumns = this.printOption.column;
       this.wideTableColumns = this.printOption.column;
       this.wideTableData = this.$refs.crud.list
       this.wideTableData = this.$refs.crud.list
-      let yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年MM月");
-      if (this.isSelAnnual) {
-        yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年");
-      }
-      this.printTitle = `${yearAndMonthCN}技术人员花名册`;
-
+      
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       })
       })

+ 2 - 1
src/views/tech-person/cy-person-roster.vue

@@ -46,6 +46,7 @@
       :print-title="printTitle"
       :print-title="printTitle"
       :rows-per-page="30"
       :rows-per-page="30"
       :default-landscape="true"
       :default-landscape="true"
+      :zoom="58"
     />
     />
   </basic-container>
   </basic-container>
 </template>
 </template>
@@ -100,7 +101,7 @@ export default window.$crudCommon({
      * @param isLandscape 是否横向打印
      * @param isLandscape 是否横向打印
      */
      */
     printTable(isLandscape) {
     printTable(isLandscape) {
-      this.wideTableColumns = this.$refs.crud.columnOption;
+      this.wideTableColumns = this.printOption.column;
       this.printTitle = `${this.pageTitle}`;
       this.printTitle = `${this.pageTitle}`;
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);

+ 9 - 4
src/views/yf-cost-manage/basic-data-setting/month-salary-list.vue

@@ -65,7 +65,7 @@
       ref="printWideTable"
       ref="printWideTable"
       :columns="wideTableColumns"
       :columns="wideTableColumns"
       :data="data"
       :data="data"
-      :print-title="printTitle"
+      :print-title="pageTitle"
       :rows-per-page="30"
       :rows-per-page="30"
       :default-landscape="true"
       :default-landscape="true"
       :zoom="60"
       :zoom="60"
@@ -127,6 +127,12 @@ export default window.$crudCommon({
       this.getList(this.page);
       this.getList(this.page);
     }
     }
   },
   },
+  computed: {
+    pageTitle() {
+      let yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年MM月");
+      return `${yearAndMonthCN}工资明细`;
+    }
+  },
   created() {
   created() {
     let newOption = { ...this.option };
     let newOption = { ...this.option };
     // 姓名下拉框,设置监听事件
     // 姓名下拉框,设置监听事件
@@ -196,7 +202,7 @@ export default window.$crudCommon({
     },
     },
     handleExport() {
     handleExport() {
       exportBloByPost(`/api/kd-scientific/salary/export-salary?${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`);
+        downloadXls(res.data, `${this.pageTitle}.xlsx`);
       });
       });
     },
     },
     handleReadyLastMonData() {
     handleReadyLastMonData() {
@@ -217,8 +223,7 @@ export default window.$crudCommon({
     },
     },
     printTable(isLandscape) {
     printTable(isLandscape) {
       this.wideTableColumns = this.printOption.column;
       this.wideTableColumns = this.printOption.column;
-      let yearAndMonthCN = moment(this.params.yearAndMonth).format("yyyy年MM月");
-      this.printTitle = `${yearAndMonthCN}工资明细`;
+      
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       });
       });