Browse Source

添加订单数量、批量打印pdf、刷新token异常处理

qianduan 6 months ago
parent
commit
f02e696da2

BIN
dist.zip


+ 147 - 0
package-lock.json

@@ -10,11 +10,14 @@
       "dependencies": {
         "axios": "^1.6.8",
         "core-js": "^3.8.3",
+        "echarts": "^5.5.0",
         "element-china-area-data": "^5.0.2",
         "element-ui": "^2.15.14",
         "nprogress": "^0.2.0",
+        "pdf-lib": "^1.17.1",
         "vue": "^2.6.14",
         "vue-amap": "^0.5.10",
+        "vue-buffer": "^0.0.1",
         "vue-router": "^3.5.1",
         "vuex": "^3.6.2"
       },
@@ -2369,6 +2372,22 @@
         "node": ">= 8"
       }
     },
+    "node_modules/@pdf-lib/standard-fonts": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz",
+      "integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==",
+      "dependencies": {
+        "pako": "^1.0.6"
+      }
+    },
+    "node_modules/@pdf-lib/upng": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/@pdf-lib/upng/-/upng-1.0.1.tgz",
+      "integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==",
+      "dependencies": {
+        "pako": "^1.0.10"
+      }
+    },
     "node_modules/@polka/url": {
       "version": "1.0.0-next.25",
       "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz",
@@ -5817,6 +5836,20 @@
         "node": ">=6.0.0"
       }
     },
+    "node_modules/echarts": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz",
+      "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==",
+      "dependencies": {
+        "tslib": "2.3.0",
+        "zrender": "5.5.0"
+      }
+    },
+    "node_modules/echarts/node_modules/tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+    },
     "node_modules/ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -9730,6 +9763,11 @@
         "node": ">=6"
       }
     },
+    "node_modules/pako": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz",
+      "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
+    },
     "node_modules/param-case": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
@@ -9872,6 +9910,22 @@
         "node": ">=8"
       }
     },
+    "node_modules/pdf-lib": {
+      "version": "1.17.1",
+      "resolved": "https://registry.npmmirror.com/pdf-lib/-/pdf-lib-1.17.1.tgz",
+      "integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==",
+      "dependencies": {
+        "@pdf-lib/standard-fonts": "^1.0.0",
+        "@pdf-lib/upng": "^1.0.1",
+        "pako": "^1.0.11",
+        "tslib": "^1.11.1"
+      }
+    },
+    "node_modules/pdf-lib/node_modules/tslib": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+    },
     "node_modules/picocolors": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@@ -12733,6 +12787,11 @@
         "npm": ">= 3.0.0"
       }
     },
+    "node_modules/vue-buffer": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmmirror.com/vue-buffer/-/vue-buffer-0.0.1.tgz",
+      "integrity": "sha512-D9q93U6rzIeGthpq+yOgKKWDoSrWQlKHTxOW1Y8hVscA8uHYtE600VNLwoFrDhpdcgpMBetM/VRfDCb7/dmImA=="
+    },
     "node_modules/vue-eslint-parser": {
       "version": "8.3.0",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
@@ -13501,6 +13560,19 @@
       "engines": {
         "node": ">=0.10.0"
       }
+    },
+    "node_modules/zrender": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz",
+      "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==",
+      "dependencies": {
+        "tslib": "2.3.0"
+      }
+    },
+    "node_modules/zrender/node_modules/tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+      "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
     }
   },
   "dependencies": {
@@ -15084,6 +15156,22 @@
         "fastq": "^1.6.0"
       }
     },
+    "@pdf-lib/standard-fonts": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz",
+      "integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==",
+      "requires": {
+        "pako": "^1.0.6"
+      }
+    },
+    "@pdf-lib/upng": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/@pdf-lib/upng/-/upng-1.0.1.tgz",
+      "integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==",
+      "requires": {
+        "pako": "^1.0.10"
+      }
+    },
     "@polka/url": {
       "version": "1.0.0-next.25",
       "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz",
@@ -17496,6 +17584,22 @@
       "integrity": "sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w==",
       "dev": true
     },
+    "echarts": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz",
+      "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==",
+      "requires": {
+        "tslib": "2.3.0",
+        "zrender": "5.5.0"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+          "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+        }
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -20237,6 +20341,11 @@
       "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
       "dev": true
     },
+    "pako": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz",
+      "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
+    },
     "param-case": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
@@ -20343,6 +20452,24 @@
       "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
       "dev": true
     },
+    "pdf-lib": {
+      "version": "1.17.1",
+      "resolved": "https://registry.npmmirror.com/pdf-lib/-/pdf-lib-1.17.1.tgz",
+      "integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==",
+      "requires": {
+        "@pdf-lib/standard-fonts": "^1.0.0",
+        "@pdf-lib/upng": "^1.0.1",
+        "pako": "^1.0.11",
+        "tslib": "^1.11.1"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "1.14.1",
+          "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz",
+          "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+        }
+      }
+    },
     "picocolors": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@@ -22236,6 +22363,11 @@
         "uppercamelcase": "^1.1.0"
       }
     },
+    "vue-buffer": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmmirror.com/vue-buffer/-/vue-buffer-0.0.1.tgz",
+      "integrity": "sha512-D9q93U6rzIeGthpq+yOgKKWDoSrWQlKHTxOW1Y8hVscA8uHYtE600VNLwoFrDhpdcgpMBetM/VRfDCb7/dmImA=="
+    },
     "vue-eslint-parser": {
       "version": "8.3.0",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
@@ -22759,6 +22891,21 @@
           "dev": true
         }
       }
+    },
+    "zrender": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz",
+      "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==",
+      "requires": {
+        "tslib": "2.3.0"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+          "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+        }
+      }
     }
   }
 }

+ 2 - 0
package.json

@@ -14,8 +14,10 @@
     "element-china-area-data": "^5.0.2",
     "element-ui": "^2.15.14",
     "nprogress": "^0.2.0",
+    "pdf-lib": "^1.17.1",
     "vue": "^2.6.14",
     "vue-amap": "^0.5.10",
+    "vue-buffer": "^0.0.1",
     "vue-router": "^3.5.1",
     "vuex": "^3.6.2"
   },

+ 6 - 3
src/components/humitureSupervision.vue

@@ -93,9 +93,12 @@
       inverseData() {
         if (this.probeList.length > 0) {
           this.tIds = []
-          const tId = this.probeList[0].T_id
-          this.tIds.push(tId)
-          this.checkList.push(tId)
+          const tId = []
+          this.probeList.forEach(item => {
+            tId.push(item.T_id)
+          })
+          this.tIds = tId
+          this.checkList = tId
           this.getList()
         }
       },

+ 7 - 2
src/components/orderDetails.vue

@@ -24,7 +24,8 @@
               <div class="grid-content bg-purple" v-else-if="item.field == 'ReceiptImg'">
                 <div class="card_item_image" v-for="(item1,index1) in getReceipt(waybillData[`${item.field}`])"
                   :key="index1" v-if="waybillData[`${item.field}`]">
-                  <el-image style="width: 100px; height: 100px" :src="item1.url" :preview-src-list="[item1.url]" v-if="item1.url"></el-image>
+                  <el-image style="width: 100px; height: 100px" :src="item1.url" :preview-src-list="[item1.url]"
+                    v-if="item1.url"></el-image>
                   <div class="describe1">{{item1.title}}</div>
                 </div>
               </div>
@@ -109,6 +110,10 @@
           field: 'cargoType',
           colWidth: 8,
         }, {
+          title: '数量:',
+          field: 'quantity',
+          colWidth: 8,
+        }, {
           title: '入库/装车时间:',
           field: 'deliveryTime',
           colWidth: 8,
@@ -186,7 +191,7 @@
         return color
       },
       getReceipt(value) {
-        if(value){
+        if (value) {
           const arr = value.split(',')
           const arrList = [{
             title: '运单签收图片',

+ 20 - 5
src/components/tables.vue

@@ -1,8 +1,8 @@
 <template>
   <!-- tables -->
   <div class="tables_grid">
-    <el-table class="table-style" :data="tableData" style="width: 100%" :border="border" @cell-click="cellClick"
-      @selection-change="handleSelectionChange">
+    <el-table ref="tableRef" class="table-style" :data="tableData" style="width: 100%" :border="border"
+      :row-key="(val) => val.id" @cell-click="cellClick" @selection-change="handleSelectionChange">
       <template v-for="(item,index) in tableList">
         <el-table-column :fixed="suspension ? 'right' : false" :label="item.label" :width="item.colWidth" align="center"
           v-if="item.field == 'action'">
@@ -48,7 +48,8 @@
         <el-table-column type="index" :fixed="item.boxhead ? true : false" width="80px" :label="item.label"
           :align="item.align" v-else-if="item.field == 'index'">
         </el-table-column>
-        <el-table-column type="selection" width="55" v-else-if="item.field == 'selection'"></el-table-column>
+        <el-table-column type="selection" v-model="selectionList" reserve-selection width="55"
+          v-else-if="item.field == 'selection'"></el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align" v-else>
         </el-table-column>
       </template>
@@ -98,6 +99,7 @@
       return {
         orderStatusList: orderStatus(),
         waybillIds: [],
+        selectionList: [],
       }
     },
     methods: {
@@ -194,6 +196,12 @@
             } else {
               return true
             }
+          } else if (type == 'pdf') {
+            if (row.status == 8) {
+              return false
+            } else {
+              return true
+            }
           }
         }
       },
@@ -203,12 +211,19 @@
       },
       // 选择多行数据
       handleSelectionChange(row) {
+        this.selectionList = row
         let arrID = []
         const arr = row
         arr.forEach(item => {
-          arrID.push(item.id)
+          // const option = {
+          //   id: item.id,
+          //   status: item.status,
+          // }
+          // arrID.push(option)
+          // arrID.push(item.id)
+          arrID.push(item)
         })
-        this.waybillIds = arrID
+        this.waybillIds = JSON.parse(JSON.stringify(arrID))
       },
       // 操作按钮
       buttonData(row, type) {

+ 2 - 2
src/permission.js

@@ -12,7 +12,7 @@ NProgress.configure({
   showSpinner: false
 })
 
-const allowList = ['login', 'WaybillInquiry', 'FourOhFour'] // no redirect allowList
+const allowList = ['login', 'newInquiry', 'WaybillInquiry', 'FourOhFour'] // no redirect allowList
 
 //全局前置路由,若无next()则不会进行下一步骤
 router.beforeEach(async (to, from, next) => {
@@ -28,7 +28,7 @@ router.beforeEach(async (to, from, next) => {
       })
       NProgress.done()
     } else {
-      if (store.getters.roles.length != 0) {
+      if (store.getters.roles.length != 0 || allowList.includes(to.name)) {
         next()
       } else {
         store.dispatch('GetInfo').then(value => {

+ 22 - 20
src/store/modules/user.js

@@ -57,27 +57,29 @@ const user = {
     }) {
       return new Promise((resolve, reject) => {
         userProfile().then(res => {
-          if (res.code == 200) {
-            localStorage.setItem('userList', JSON.stringify(res.data.user));
-            const arr = {
-              deptId: res.data.user.deptId,
-              userType: res.data.user.userType,
+          if (res) {
+            if (res.code == 200) {
+              localStorage.setItem('userList', JSON.stringify(res.data.user));
+              const arr = {
+                deptId: res.data.user.deptId,
+                userType: res.data.user.userType,
+              }
+              const roles = [{
+                action: 'add',
+                describe: '新增',
+                defaultCheck: false
+              }]
+              // 存储用户信息,方便用于全局
+              commit('SET_ROLES', roles)
+              resolve(arr)
+            } else {
+              commit('SET_TOKEN', '')
+              commit('SET_ROLES', [])
+              commit('setMenu', [])
+              localStorage.removeItem('T_tokey');
+              localStorage.removeItem('username');
+              router.push('/login');
             }
-            const roles = [{
-              action: 'add',
-              describe: '新增',
-              defaultCheck: false
-            }]
-            // 存储用户信息,方便用于全局
-            commit('SET_ROLES', roles)
-            resolve(arr)
-          } else {
-            commit('SET_TOKEN', '')
-            commit('SET_ROLES', [])
-            commit('setMenu', [])
-            localStorage.removeItem('T_tokey');
-            localStorage.removeItem('username');
-            router.push('/login');
           }
         })
       })

+ 9 - 22
src/utils/request.js

@@ -54,36 +54,23 @@ request.interceptors.response.use((response) => {
     if (downLoadMark[0] === 'attachment') {
       // 执行下载
       let fileName = downLoadMark[1].split('filename=')[1];
-      if (fileName) {
-        //fileName = decodeURIComponent(filename);//对filename进行转码
-        fileName = decodeURI(fileName);
-        if (window.navigator.msSaveOrOpenBlob) {
-          navigator.msSaveBlob(new Blob([response.data]), fileName);
-        } else {
-          let url = window.URL.createObjectURL(new Blob([response.data]));
-          let link = document.createElement('a');
-          link.style.display = 'none';
-          link.href = url;
-          link.setAttribute('download', fileName);
-          document.body.appendChild(link);
-          link.click();
-          return;
-        }
-      } else {
-        return response.data;
+      const arr = {
+        data: response.data,
+        fileName: fileName,
       }
+      return arr
     }
   }
   if (response.data.Code || response.data.code) {
     const res = response.data
     if (res.code == 6401) {
-      return refreshToken().then(res => {
+      return refreshToken().then(resil => {
         // 更新本地存储的 Token
-        if (res != undefined) {
-          localStorage.setItem("T_tokey", res.token);
+        if (resil != undefined) {
+          localStorage.setItem("T_tokey", resil.token);
+          // 重新发送原请求
+          return request(response.config);
         }
-        // 重新发送原请求
-        return request(response.config);
       })
     } else if (res.Code == 401 || res.code == 401) {
       localStorage.removeItem('T_tokey');

+ 3 - 1
src/views/page/Home.vue

@@ -103,7 +103,9 @@
     mounted() {
       const arr = localStorage.getItem('userData')
       const arr1 = JSON.parse(arr)
-      this.userName = arr1.name
+      if (arr1) {
+        this.userName = arr1.name
+      }
 
       function formatDate(date, type) {
         const year = date.getFullYear();

+ 186 - 2
src/views/system/MyWaybill.vue

@@ -5,7 +5,8 @@
       @searchProtocol="searchProtocol"></actionBar>
     <div class="card_content">
       <!-- 表单 -->
-      <tables :suspension="true" :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+      <tables ref="refWaybill" :suspension="true" :tableList="tableList" :tableData="tableData"
+        @buttonData="buttonData"></tables>
       <!-- 分页 -->
       <div v-if="Total">
         <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
@@ -50,11 +51,38 @@
         </div>
       </div>
     </el-dialog>
+    <el-dialog title="批量打印" :visible.sync="bulkPrintVisible" width="60%" :close-on-click-modal="false">
+      <tables :suspension="true" :tableList="tableList1" :tableData="tableData1">
+      </tables>
+      <div style="display: flex;margin-top: 15px;justify-content: flex-end;">
+        <div style="display: flex;align-items: center;margin-right: 10px;">
+          <span style="font-size: 14px;margin-right: 8px;">湿度展示</span>
+          <el-switch v-model="humidity"></el-switch>
+        </div>
+        <el-button size="medium" type="primary" icon="el-icon-printer" :loading="peintFlag"
+          @click="bulkPrint">批量打印</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="下载PDF" :visible.sync="pdfDialogVisible" width="400px">
+      <div style="display: flex;align-items: center;margin-right: 10px;">
+        <span style="font-size: 14px;margin-right: 8px;">湿度展示</span>
+        <el-switch v-model="humidityil"></el-switch>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="medium" @click="pdfDialogVisible = false">取 消</el-button>
+        <el-button size="medium" type="primary" @click="downloadPdf(waybillNo)">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
   import {
+    PDFDocument
+  } from 'pdf-lib'
+  import axios from 'axios'
+  import Buffer from 'vue-buffer'
+  import {
     waybillImport,
     exportTemplate
   } from '@/api/waybill'
@@ -66,6 +94,7 @@
   import {
     putWaybill,
     delWaybill,
+    getTemperature
   } from '@/api/waybill'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
@@ -75,7 +104,8 @@
   import orderDetails from '@/components/orderDetails'
   import {
     formRules,
-    employee
+    employee,
+    employeeil
   } from "./myWaybillTable.js";
   import {
     myOrder
@@ -94,6 +124,11 @@
       return {
         mywaybill: true,
         operateList: [{
+          type: 'print',
+          title: '批量打印',
+          colour: 'success',
+          icon: 'el-icon-printer',
+        }, {
           type: 'add',
           title: '添加运单',
           icon: 'el-icon-plus',
@@ -166,6 +201,7 @@
           cargoType: '',
           customerName: '',
           remark: '',
+          quantity: '',
         },
         formRuleList: [],
         waybillData: {},
@@ -175,6 +211,14 @@
         importFlag: false,
         downloadFlag: false,
         searchValue: {},
+        bulkPrintVisible: false,
+        tableList1: employeeil(),
+        tableData1: [],
+        peintFlag: false,
+        humidity: true,
+        pdfDialogVisible: false,
+        humidityil: true,
+        waybillNo: '',
       }
     },
     mounted() {
@@ -223,6 +267,7 @@
             consigneeAddressDetails: this.recipientsForm.address,
             ...this.ruleForm
           }
+          params.quantity = Number(params.quantity)
           if (this.operationType == 'add') {
             await addWaybill(params).then(res => {
               if (res.code == 200) {
@@ -277,6 +322,7 @@
               this.ruleForm.temperatureInterval = String(row.temperatureInterval)
               this.ruleForm.deliveryCondition = row.deliveryCondition
               this.ruleForm.cargoType = row.cargoType
+              this.ruleForm.quantity = row.quantity
               this.ruleForm.customerName = row.customerName
               this.ruleForm.remark = row.remark
             })
@@ -291,8 +337,58 @@
           window.open(href, "_blank");
         } else if (type == 'del') {
           this.deleteUser(row.id)
+        } else if (type == 'pdf') {
+          this.pdfDialogVisible = true
+          this.waybillNo = row.waybillNo
+          // this.downloadPdf(row)
         }
       },
+      // 下载pdf
+      downloadPdf(value) {
+        getTemperature({
+          waybillNo: value,
+          humidityShow: this.humidityil,
+        }).then(response => {
+          if (response.fileName) {
+            this.pdfDialogVisible = false
+            //fileName = decodeURIComponent(filename);//对filename进行转码
+            let fileName = decodeURI(response.fileName);
+            if (window.navigator.msSaveOrOpenBlob) {
+              navigator.msSaveBlob(new Blob([response.data]), fileName);
+            } else {
+              let url = window.URL.createObjectURL(new Blob([response.data]));
+              let link = document.createElement('a');
+              link.style.display = 'none';
+              link.href = url;
+              link.setAttribute('download', fileName);
+              document.body.appendChild(link);
+              link.click();
+            }
+          } else {
+            this.$message.error('未获取到文件名');
+          }
+        })
+      },
+      // 获取pdf
+      requestPdf(waybillNo) {
+        return new Promise((resolve) => {
+          getTemperature({
+            waybillNo: waybillNo,
+            humidityShow: this.humidity,
+          }).then(response => {
+            if (response.fileName) {
+              //fileName = decodeURIComponent(filename);//对filename进行转码
+              let fileName = decodeURI(response.fileName);
+              if (window.navigator.msSaveOrOpenBlob) {
+                navigator.msSaveBlob(new Blob([response.data]), fileName);
+              } else {
+                let url = window.URL.createObjectURL(new Blob([response.data]));
+                resolve(url);
+              }
+            }
+          })
+        });
+      },
       openModel(type) {
         this.operationType = type
         if (type == 'add') {
@@ -302,8 +398,96 @@
           this.staffDialogVisible = true
         } else if (type == 'import') {
           this.bulkImportVisible = true
+        } else if (type == 'print') {
+          const arrID = this.$refs.refWaybill.waybillIds
+          if (arrID.length != 0) {
+            let arr3 = []
+            let arr4 = []
+            arrID.forEach(item => {
+              if (item.status == 8) {
+                arr3.push(item)
+                arr4.push(item.id)
+              }
+            })
+            this.tableData1 = arr3
+            this.printIdList = arr4
+            if (arr3.length > 0) {
+              this.bulkPrintVisible = true
+            } else {
+              this.$message({
+                message: '请选择已签收的运单',
+                type: 'warning'
+              });
+            }
+          } else {
+            this.$message({
+              message: '请先选择需要批量操作的运单',
+              type: 'warning'
+            });
+          }
+        }
+      },
+      // 批量打印
+      async bulkPrint() {
+        this.peintFlag = true
+        try {
+          let resulr = []
+          for (let i = 0; i < this.tableData1.length; i++) {
+            let urlimg = await this.requestPdf(this.tableData1[i].waybillNo)
+            if (urlimg) {
+              resulr.push(urlimg)
+            } else {
+              throw new Error('请求错误,终止请求');
+            }
+          }
+          const mergeBuffer = await this.mergePdf(resulr)
+          //文件以pdf形式进行预览
+          let blob = new Blob([mergeBuffer], {
+            type: "application/pdf;chartset=UTF-8",
+          });
+          let fileURL = URL.createObjectURL(blob);
+          window.open(fileURL);
+          this.peintFlag = false
+          this.bulkPrintVisible = false
+        } catch (error) {
+          throw new Error('请求错误,终止请求');
         }
       },
+      async mergePdf(urlList) {
+        // eslint-disable-next-line no-async-promise-executor
+        return new Promise(async (resolve) => {
+          const promises = []
+          urlList.map((url) => {
+            // eslint-disable-next-line no-async-promise-executor
+            const tmp = new Promise(async (resolve) => {
+              const response = await axios({
+                method: 'get',
+                url,
+                responseType: 'arraybuffer'
+              })
+              resolve(Buffer.from(response.data))
+            })
+            promises.push(tmp)
+          })
+
+          const pdfBuffers = await Promise.all(promises)
+
+          const newPdf = await PDFDocument.create()
+          for (const buffer of pdfBuffers) {
+            const pdfDocument = await PDFDocument.load(buffer)
+            const contentPages = await newPdf.copyPages(
+              pdfDocument,
+              pdfDocument.getPageIndices()
+            )
+            for (const page of contentPages) {
+              newPdf.addPage(page)
+            }
+          }
+          const uint8Array = await newPdf.save()
+          const mergeBuffer = Buffer.from(uint8Array)
+          resolve(new Blob([mergeBuffer]))
+        })
+      },
       // 删除用户
       deleteUser(id) {
         this.$confirm('此操作将永久该运单, 是否继续?', '提示', {

+ 198 - 25
src/views/system/WaybillManagement.vue

@@ -90,11 +90,38 @@
         </div>
       </div>
     </el-dialog>
+    <el-dialog title="批量打印" :visible.sync="bulkPrintVisible" width="60%" :close-on-click-modal="false">
+      <tables :suspension="true" :tableList="tableList1" :tableData="tableData1">
+      </tables>
+      <div style="display: flex;margin-top: 15px;justify-content: flex-end;">
+        <div style="display: flex;align-items: center;margin-right: 10px;">
+          <span style="font-size: 14px;margin-right: 8px;">湿度展示</span>
+          <el-switch v-model="humidity"></el-switch>
+        </div>
+        <el-button size="medium" type="primary" icon="el-icon-printer" :loading="peintFlag"
+          @click="bulkPrint">批量打印</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="下载PDF" :visible.sync="pdfDialogVisible" width="400px">
+      <div style="display: flex;align-items: center;margin-right: 10px;">
+        <span style="font-size: 14px;margin-right: 8px;">湿度展示</span>
+        <el-switch v-model="humidityil"></el-switch>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="medium" @click="pdfDialogVisible = false">取 消</el-button>
+        <el-button size="medium" type="primary" @click="downloadPdf(waybillNo)">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
   import {
+    PDFDocument
+  } from 'pdf-lib'
+  import axios from 'axios'
+  import Buffer from 'vue-buffer'
+  import {
     getWaybill,
     getWaybillDetails,
     addWaybill,
@@ -128,7 +155,8 @@
     formRules,
     employee,
     addressBook,
-    sendList
+    sendList,
+    employee1
   } from "./waybill.js";
   import {
     WaybillStatus
@@ -150,9 +178,10 @@
     data() {
       return {
         operateList: [{
-          type: 'add',
-          title: '添加运单',
-          icon: 'el-icon-plus',
+          type: 'print',
+          title: '批量打印',
+          colour: 'success',
+          icon: 'el-icon-printer',
         }, {
           type: 'sends',
           title: '批量派单',
@@ -161,6 +190,10 @@
           type: 'import',
           title: '批量导入',
           colour: 'warning'
+        }, {
+          type: 'add',
+          title: '添加运单',
+          icon: 'el-icon-plus',
         }],
         formList: [{
           type: 'input',
@@ -239,6 +272,7 @@
           cargoType: '',
           customerName: '',
           remark: '',
+          quantity: '',
         },
         formRuleList: [],
         bookType: '',
@@ -260,6 +294,15 @@
         staffName: '',
         sendOrdersId: 2,
         searchValue: {},
+        bulkPrintVisible: false,
+        tableList1: employee1(),
+        tableData1: [],
+        printIdList: [],
+        peintFlag: false,
+        humidity: true,
+        pdfDialogVisible: false,
+        humidityil: true,
+        waybillNo: '',
       }
     },
     mounted() {
@@ -317,21 +360,7 @@
         let flag = this.$refs['childRules'].validateForm();
         if (senderFlag && recipientsFlag && flag) {
           this.confirmLoading = true
-          // let senderAddressId = null
-          // let consigneeAddressId = null
-          // if (!this.senderForm.id) {
-          //   senderAddressId = await this.getSender(this.senderForm)
-          // } else {
-          //   senderAddressId = this.senderForm.id
-          // }
-          // if (!this.recipientsForm.id) {
-          //   consigneeAddressId = await this.getRecipients(this.recipientsForm)
-          // } else {
-          //   consigneeAddressId = this.recipientsForm.id
-          // }
           var params = {
-            // senderAddressId: senderAddressId,
-            // consigneeAddressId: consigneeAddressId,
             senderAddressName: this.senderForm.name,
             senderAddressPhone: this.senderForm.phone,
             senderAddressDetails: this.senderForm.address,
@@ -340,6 +369,7 @@
             consigneeAddressDetails: this.recipientsForm.address,
             ...this.ruleForm
           }
+          params.quantity = Number(params.quantity)
           if (this.operationType == 'add') {
             await addWaybill(params).then(res => {
               if (res.code == 200) {
@@ -485,6 +515,7 @@
               this.ruleForm.temperatureInterval = String(row.temperatureInterval)
               this.ruleForm.deliveryCondition = row.deliveryCondition
               this.ruleForm.cargoType = row.cargoType
+              this.ruleForm.quantity = row.quantity
               this.ruleForm.customerName = row.customerName
               this.ruleForm.remark = row.remark
             })
@@ -495,17 +526,57 @@
         } else if (type == 'del') {
           this.deleteUser(row.id)
         } else if (type == 'pdf') {
-          this.downloadPdf(row)
+          this.pdfDialogVisible = true
+          this.waybillNo = row.waybillNo
+          // this.downloadPdf(row)
         }
       },
       // 下载pdf
       downloadPdf(value) {
         getTemperature({
-          waybillNo: value.waybillNo,
-        }).then(res => {
-          // console.log(res,26)
+          waybillNo: value,
+          humidityShow: this.humidityil,
+        }).then(response => {
+          if (response.fileName) {
+            this.pdfDialogVisible = false
+            //fileName = decodeURIComponent(filename);//对filename进行转码
+            let fileName = decodeURI(response.fileName);
+            if (window.navigator.msSaveOrOpenBlob) {
+              navigator.msSaveBlob(new Blob([response.data]), fileName);
+            } else {
+              let url = window.URL.createObjectURL(new Blob([response.data]));
+              let link = document.createElement('a');
+              link.style.display = 'none';
+              link.href = url;
+              link.setAttribute('download', fileName);
+              document.body.appendChild(link);
+              link.click();
+            }
+          } else {
+            this.$message.error('未获取到文件名');
+          }
         })
       },
+      // 获取pdf
+      requestPdf(waybillNo) {
+        return new Promise((resolve) => {
+          getTemperature({
+            waybillNo: waybillNo,
+            humidityShow: this.humidity,
+          }).then(response => {
+            if (response.fileName) {
+              //fileName = decodeURIComponent(filename);//对filename进行转码
+              let fileName = decodeURI(response.fileName);
+              if (window.navigator.msSaveOrOpenBlob) {
+                navigator.msSaveBlob(new Blob([response.data]), fileName);
+              } else {
+                let url = window.URL.createObjectURL(new Blob([response.data]));
+                resolve(url);
+              }
+            }
+          })
+        });
+      },
       // 订单派单
       sendHandleAdd() {
         let flag = this.$refs['sendRules'].validateForm();
@@ -628,6 +699,7 @@
         })
       },
       openModel(type) {
+        // console.log(this.$refs.refWaybill.selectionList,333)
         this.operationType = type
         if (type == 'add') {
           this.tableBook()
@@ -636,9 +708,22 @@
         } else if (type == 'sends') {
           const arrID = this.$refs.refWaybill.waybillIds
           if (arrID.length != 0) {
-            this.waybillIdList = arrID
-            this.sendDialogVisible = true
-            this.getUserList(2)
+            let arr2 = []
+            arrID.forEach(item => {
+              if (item.status == 1 || item.status == 2 || item.status == 3) {
+                arr2.push(item.id)
+              }
+            })
+            this.waybillIdList = arr2
+            if (arr2.length > 0) {
+              this.sendDialogVisible = true
+              this.getUserList(2)
+            } else {
+              this.$message({
+                message: '请选择未派单的运单',
+                type: 'warning'
+              });
+            }
           } else {
             this.$message({
               message: '请先选择需要批量操作的运单',
@@ -648,6 +733,33 @@
           // console.log(type, arrID, '批量派单')
         } else if (type == 'import') {
           this.bulkImportVisible = true
+        } else if (type == 'print') {
+          const arrID = this.$refs.refWaybill.waybillIds
+          if (arrID.length != 0) {
+            let arr3 = []
+            let arr4 = []
+            arrID.forEach(item => {
+              if (item.status == 8) {
+                arr3.push(item)
+                arr4.push(item.id)
+              }
+            })
+            this.tableData1 = arr3
+            this.printIdList = arr4
+            if (arr3.length > 0) {
+              this.bulkPrintVisible = true
+            } else {
+              this.$message({
+                message: '请选择已签收的运单',
+                type: 'warning'
+              });
+            }
+          } else {
+            this.$message({
+              message: '请先选择需要批量操作的运单',
+              type: 'warning'
+            });
+          }
         }
       },
       // 导入
@@ -684,6 +796,67 @@
           this.downloadFlag = false
         })
       },
+      // 批量打印
+      async bulkPrint() {
+        this.peintFlag = true
+        try {
+          let resulr = []
+          for (let i = 0; i < this.tableData1.length; i++) {
+            let urlimg = await this.requestPdf(this.tableData1[i].waybillNo)
+            if (urlimg) {
+              resulr.push(urlimg)
+            } else {
+              throw new Error('请求错误,终止请求');
+            }
+          }
+          const mergeBuffer = await this.mergePdf(resulr)
+          //文件以pdf形式进行预览
+          let blob = new Blob([mergeBuffer], {
+            type: "application/pdf;chartset=UTF-8",
+          });
+          let fileURL = URL.createObjectURL(blob);
+          window.open(fileURL);
+          this.peintFlag = false
+          this.bulkPrintVisible = false
+        } catch (error) {
+          throw new Error('请求错误,终止请求');
+        }
+      },
+      async mergePdf(urlList) {
+        // eslint-disable-next-line no-async-promise-executor
+        return new Promise(async (resolve) => {
+          const promises = []
+          urlList.map((url) => {
+            // eslint-disable-next-line no-async-promise-executor
+            const tmp = new Promise(async (resolve) => {
+              const response = await axios({
+                method: 'get',
+                url,
+                responseType: 'arraybuffer'
+              })
+              resolve(Buffer.from(response.data))
+            })
+            promises.push(tmp)
+          })
+
+          const pdfBuffers = await Promise.all(promises)
+
+          const newPdf = await PDFDocument.create()
+          for (const buffer of pdfBuffers) {
+            const pdfDocument = await PDFDocument.load(buffer)
+            const contentPages = await newPdf.copyPages(
+              pdfDocument,
+              pdfDocument.getPageIndices()
+            )
+            for (const page of contentPages) {
+              newPdf.addPage(page)
+            }
+          }
+          const uint8Array = await newPdf.save()
+          const mergeBuffer = Buffer.from(uint8Array)
+          resolve(new Blob([mergeBuffer]))
+        })
+      },
       // 上传文件
       UploadImage(param) {
         this.importFile = param.file

+ 64 - 6
src/views/system/myWaybillTable.js

@@ -3,9 +3,14 @@ import {
 } from '@/assets/js/blockSort'
 export const employee = () => {
   return [{
+    field: 'selection',
+    label: '多选',
+    align: 'center',
+  }, {
     field: 'waybillNo',
     label: '订单号',
     align: 'center',
+    colWidth: '180px',
   }, {
     field: 'myStatus',
     label: '状态',
@@ -20,13 +25,10 @@ export const employee = () => {
     label: '收件人',
     align: 'center',
   }, {
-    field: 'createdAt',
-    label: '下单时间',
-    align: 'center',
-  }, {
     field: 'temperatureInterval',
     label: '温度要求',
     align: 'center',
+    colWidth: '150px',
   }, {
     field: 'deliveryCondition',
     label: '配送要求',
@@ -36,11 +38,25 @@ export const employee = () => {
     label: '货物类型',
     align: 'center',
   }, {
+    field: 'quantity',
+    label: '数量',
+    align: 'center',
+  }, {
+    field: 'createdAt',
+    label: '下单时间',
+    align: 'center',
+    colWidth: '180px',
+  }, {
     field: 'action',
     label: '操作',
-    colWidth: '300px',
+    colWidth: '400px',
     align: 'center',
     labelButton: [{
+      type: 'pdf',
+      label: '下载PDF',
+      icon: 'el-icon-download',
+      style: 'warning',
+    }, {
       type: 'logs',
       label: '详情',
       icon: 'el-icon-tickets',
@@ -63,7 +79,34 @@ export const employee = () => {
     }]
   }]
 }
-
+export const employeeil = () => {
+  return [{
+    field: 'waybillNo',
+    label: '运单号',
+    align: 'center',
+  }, {
+    field: 'status',
+    label: '状态',
+    align: 'center',
+    options: myOrder()
+  }, {
+    field: 'senderAddressName',
+    label: '寄件人',
+    align: 'center',
+  }, {
+    field: 'consigneeAddressName',
+    label: '收件人',
+    align: 'center',
+  }, {
+    field: 'createdAt',
+    label: '下单时间',
+    align: 'center',
+  }, {
+    field: 'printUser.nickName',
+    label: '制单人',
+    align: 'center',
+  }]
+}
 export const formRules = () => {
   return [{
     field: 'temperatureInterval',
@@ -121,6 +164,10 @@ export const formRules = () => {
       {
         label: '医药整车',
         value: '医药整车',
+      },
+      {
+        label: '零担物流',
+        value: '零担物流',
       }
     ],
   }, {
@@ -157,6 +204,17 @@ export const formRules = () => {
       }
     ],
   }, {
+    field: 'quantity',
+    type: 'input',
+    label: '数量',
+    placeholder: '请输入数量',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请输入数量',
+      trigger: 'blur,change'
+    }],
+  }, {
     field: 'remark',
     label: '备注',
     placeholder: '备注',

+ 63 - 1
src/views/system/waybill.js

@@ -11,6 +11,7 @@ export const employee = () => {
     field: 'waybillNo',
     label: '运单号',
     align: 'center',
+    colWidth: '180px',
   }, {
     field: 'status',
     label: '状态',
@@ -25,9 +26,27 @@ export const employee = () => {
     label: '收件人',
     align: 'center',
   }, {
+    field: 'temperatureInterval',
+    label: '温度要求',
+    align: 'center',
+    colWidth: '150px',
+  }, {
+    field: 'deliveryCondition',
+    label: '配送要求',
+    align: 'center',
+  }, {
+    field: 'cargoType',
+    label: '货物类型',
+    align: 'center',
+  }, {
+    field: 'quantity',
+    label: '数量',
+    align: 'center',
+  }, {
     field: 'createdAt',
     label: '下单时间',
     align: 'center',
+    colWidth: '180px',
   }, {
     field: 'printUser.nickName',
     label: '制单人',
@@ -42,7 +61,7 @@ export const employee = () => {
       label: '下载PDF',
       icon: 'el-icon-download',
       style: 'warning',
-    },{
+    }, {
       type: 'logs',
       label: '详情',
       icon: 'el-icon-tickets',
@@ -65,6 +84,34 @@ export const employee = () => {
     }]
   }]
 }
+export const employee1 = () => {
+  return [{
+    field: 'waybillNo',
+    label: '运单号',
+    align: 'center',
+  }, {
+    field: 'status',
+    label: '状态',
+    align: 'center',
+    options: WaybillStatus()
+  }, {
+    field: 'senderAddressName',
+    label: '寄件人',
+    align: 'center',
+  }, {
+    field: 'consigneeAddressName',
+    label: '收件人',
+    align: 'center',
+  }, {
+    field: 'createdAt',
+    label: '下单时间',
+    align: 'center',
+  }, {
+    field: 'printUser.nickName',
+    label: '制单人',
+    align: 'center',
+  }]
+}
 
 export const formRules = () => {
   return [{
@@ -123,6 +170,10 @@ export const formRules = () => {
       {
         label: '医药整车',
         value: '医药整车',
+      },
+      {
+        label: '零担物流',
+        value: '零担物流',
       }
     ],
   }, {
@@ -159,6 +210,17 @@ export const formRules = () => {
       }
     ],
   }, {
+    field: 'quantity',
+    type: 'input',
+    label: '数量',
+    placeholder: '请输入数量',
+    colWidth: 12,
+    rules: [{
+      required: true,
+      message: '请输入数量',
+      trigger: 'blur,change'
+    }],
+  }, {
     field: 'customerName',
     type: 'input',
     label: '下单客户',

+ 59 - 0
yarn.lock

@@ -1148,6 +1148,20 @@
     "@nodelib/fs.scandir" "2.1.5"
     "fastq" "^1.6.0"
 
+"@pdf-lib/standard-fonts@^1.0.0":
+  "integrity" "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA=="
+  "resolved" "https://registry.npmmirror.com/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz"
+  "version" "1.0.0"
+  dependencies:
+    "pako" "^1.0.6"
+
+"@pdf-lib/upng@^1.0.1":
+  "integrity" "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ=="
+  "resolved" "https://registry.npmmirror.com/@pdf-lib/upng/-/upng-1.0.1.tgz"
+  "version" "1.0.1"
+  dependencies:
+    "pako" "^1.0.10"
+
 "@polka/url@^1.0.0-next.24":
   "integrity" "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ=="
   "resolved" "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz"
@@ -3072,6 +3086,14 @@
   "resolved" "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.1.tgz"
   "version" "1.0.1"
 
+"echarts@^5.5.0":
+  "integrity" "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw=="
+  "resolved" "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz"
+  "version" "5.5.0"
+  dependencies:
+    "tslib" "2.3.0"
+    "zrender" "5.5.0"
+
 "ee-first@1.1.1":
   "integrity" "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
   "resolved" "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
@@ -5245,6 +5267,11 @@
   "resolved" "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz"
   "version" "2.2.0"
 
+"pako@^1.0.10", "pako@^1.0.11", "pako@^1.0.6":
+  "integrity" "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
+  "resolved" "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz"
+  "version" "1.0.11"
+
 "param-case@^3.0.4":
   "integrity" "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A=="
   "resolved" "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz"
@@ -5340,6 +5367,16 @@
   "resolved" "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz"
   "version" "4.0.0"
 
+"pdf-lib@^1.17.1":
+  "integrity" "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw=="
+  "resolved" "https://registry.npmmirror.com/pdf-lib/-/pdf-lib-1.17.1.tgz"
+  "version" "1.17.1"
+  dependencies:
+    "@pdf-lib/standard-fonts" "^1.0.0"
+    "@pdf-lib/upng" "^1.0.1"
+    "pako" "^1.0.11"
+    "tslib" "^1.11.1"
+
 "picocolors@^0.2.1":
   "integrity" "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA=="
   "resolved" "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz"
@@ -6644,11 +6681,21 @@
     "minimist" "^1.2.6"
     "strip-bom" "^3.0.0"
 
+"tslib@^1.11.1":
+  "integrity" "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+  "resolved" "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz"
+  "version" "1.14.1"
+
 "tslib@^2.0.3":
   "integrity" "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
   "resolved" "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz"
   "version" "2.6.2"
 
+"tslib@2.3.0":
+  "integrity" "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+  "resolved" "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz"
+  "version" "2.3.0"
+
 "type-check@^0.4.0", "type-check@~0.4.0":
   "integrity" "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="
   "resolved" "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz"
@@ -6838,6 +6885,11 @@
   dependencies:
     "uppercamelcase" "^1.1.0"
 
+"vue-buffer@^0.0.1":
+  "integrity" "sha512-D9q93U6rzIeGthpq+yOgKKWDoSrWQlKHTxOW1Y8hVscA8uHYtE600VNLwoFrDhpdcgpMBetM/VRfDCb7/dmImA=="
+  "resolved" "https://registry.npmmirror.com/vue-buffer/-/vue-buffer-0.0.1.tgz"
+  "version" "0.0.1"
+
 "vue-eslint-parser@^8.0.1":
   "integrity" "sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g=="
   "resolved" "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz"
@@ -7206,3 +7258,10 @@
     "is-ci" "^1.0.10"
     "normalize-path" "^1.0.0"
     "strip-indent" "^2.0.0"
+
+"zrender@5.5.0":
+  "integrity" "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w=="
+  "resolved" "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz"
+  "version" "5.5.0"
+  dependencies:
+    "tslib" "2.3.0"