quwangxin 2 سال پیش
والد
کامیت
85ac5a5416
2فایلهای تغییر یافته به همراه10 افزوده شده و 14 حذف شده
  1. 10 13
      src/components/print/OrderPrint.vue
  2. 0 1
      src/main.js

+ 10 - 13
src/components/print/OrderPrint.vue

@@ -176,7 +176,7 @@
     </div>
     <div slot="footer">
       <el-button type="primary" @click="handlePrint">打印</el-button>
-      <el-button>取消</el-button>
+      <el-button @click="cancel">取消</el-button>
     </div>
   </ele-modal>
 </template>
@@ -184,7 +184,7 @@
 <script>
   import { downloadPDF } from '@/utils/pdf.js';
   export default {
-    data () {
+    data() {
       return {
         visible: false,
         // 挤压成型
@@ -656,7 +656,7 @@
             class: ' '
           }
         ],
-        // 深加工
+        // 包装
         packageOpt: [
           {
             label: '包装要求',
@@ -774,27 +774,24 @@
     },
 
     methods: {
-      open () {
+      open() {
         this.visible = true;
         this.init();
       },
-      init () {},
+      init() {},
+      cancel() {
+        this.visible = false;
+      },
       //打印
-      handlePrint () {
+      handlePrint() {
         this.PrintLoading = true;
-        downloadPDF(this.$refs.pagesRef, 'l').then((res) => {
+        downloadPDF(this.$refs.pagesRef).then(() => {
           this.PrintLoading = false;
         });
       }
     }
   };
 </script>
-<style media="print" scoped>
-  @page {
-    size: auto; /* auto is the initial value */
-    margin-bottom: 10mm; /* this affects the margin in the printer settings */
-  }
-</style>
 <style scoped lang="scss">
   $heihgt: 36px;
   $border: 1px solid #ddd;

+ 0 - 1
src/main.js

@@ -33,7 +33,6 @@ Vue.use(VueClipboard);
 let instance = null;
 
 function render (props = {}) {
-  console.log(router, 2222);
   const { container, routerBase } = props;
   // const router = new VueRouter({
   //   base: window.__POWERED_BY_QIANKUN__ ? routerBase : process.env.BASE_URL,