Browse Source

入职登记-打印

jbb 1 year ago
parent
commit
3a2e8a2dbc
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/views/oa/modules/EnrollmentModal.vue

+ 7 - 0
src/views/oa/modules/EnrollmentModal.vue

@@ -9,6 +9,7 @@
     @cancel="handleCancel">
     <template slot="footer">
       <a-button @click="handleCancel">取消</a-button>
+      <a-button @click="print()" :href="printMouldUrl"  target="_blank" type="primary" style="margin-right: 1%;margin-left: 1%;">打印</a-button>
       <a-button @click="handleOk" type="primary" v-if="!show">保存</a-button>
     </template>
     <a-spin :spinning="confirmLoading">
@@ -252,6 +253,7 @@
         },
         // 新增时子表默认添加几行空数据
         addDefaultRowNum: 1,
+        printMouldUrl:'',
         validatorRules: {
           operator: {rules: [
             {required: true, message: '请输入登记人	!'},
@@ -443,6 +445,7 @@
             },
           ]
         },
+        id:'',
         url: {
           add: "/oa/enrollment/add",
           edit: "/oa/enrollment/edit",
@@ -465,6 +468,7 @@
       },
       /** 调用完edit()方法之后会自动调用此方法 */
       editAfter(record,stat2) {
+        this.id = record.id
         this.show = false
       if(stat2=='detail'){
         this.show = true
@@ -493,6 +497,9 @@
           enrollmentEduList: allValues.tablesValue[2].values,
         }
       },
+      print(){
+        this.printMouldUrl = 'http://172.18.91.36:8081/jeecg-boot/jmreport/shareView/835754802514579456'+'?id='+this.id
+      },
       validateError(msg){
         this.$message.error(msg)
       },