| <template> | 
|   <el-card class="box-card"> | 
|     <div slot="header" class="clearfix"> | 
|       <span>发货信息导入</span> | 
|     </div> | 
|     <!-- <el-upload ref="upload" :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSuccess" :file-list="fileList" :auto-upload="true" :action="upLoadUrl()" :limit="1" class="upload-bill"> | 
|       <el-button slot="trigger" size="small" type="primary">选取文件</el-button> | 
|       <el-button style="margin-left: 10px;" size="small" type="success" @click="submitImport()">开始导入</el-button> | 
|       <el-button style="margin-left: 10px;" size="small" type="primary" plain> | 
|         <a :href="common.ossDomain+'/node-wms/template/发货重量导入模板.xlsx'" style="color:while;font-size:12px;">下载模板</a> | 
|       </el-button> | 
|       <div slot="tip" class="el-upload__tip">只能上传扩展名为.xlsx的excel文件</div> | 
|     </el-upload> | 
|   | 
|     <el-scrollbar :noresize="false" :native="false" wrap-class="scrollbar-wrap"> | 
|       <div v-html="msgList"> | 
|         {{ msgList }} | 
|       </div> | 
|     </el-scrollbar> | 
|   </el-card> --> | 
|   | 
|     <el-button style="margin-left: 10px;" size="small" type="success" @click="submitImport()">开始导入</el-button> | 
|   | 
|     <!-- 主表批量导入 --> | 
|     <import-dialog :visible.sync="orderImportConfig.isShowDialog" :import-config="orderImportConfig"> | 
|     </import-dialog> | 
|   </el-card> | 
| </template> | 
|   | 
| <script> | 
| import baseLayout from "@/components/common/base-layout.vue"; | 
| import yrtSelector from "@/components/common/yrtSelector.vue"; | 
| import ImportDialog from "@/components/common/components/import-common-dialog"; | 
| export default { | 
|   name: "outbound-scan-outInformat-import", | 
|   components: { yrtSelector, ImportDialog }, | 
|   mixins: [baseLayout], | 
|   data() { | 
|     return { | 
|       // 消息内容 | 
|       msgList: "", | 
|       expressCorpoptions: null, | 
|       fileList: [], | 
|       fullFileRote: null, | 
|       uploadKey: null, | 
|   | 
|       // 出库单导入对话框参数 | 
|       orderImportConfig: { | 
|         // 显示导入对话框 | 
|         isShowDialog: false, | 
|         title: "发货信息批量导入", | 
|         // 导入地址 | 
|         url: "/api/outbound/order/outimportExcel", | 
|         // 模板地址 | 
|         templateUrl: "https://auod-beijing.oss-cn-beijing.aliyuncs.com/node-wms/template/发货信息导入模板.xlsx" | 
|       } | 
|     }; | 
|   }, | 
|   mounted() { | 
|     // this.getPortList(); | 
|     // this.getExpressCorpList(); | 
|     // this.getStorageList(); | 
|     // this.uploadKey = this.common.getGUID(); | 
|   }, | 
|   methods: { | 
|     submitImport() { | 
|       this.orderImportConfig.isShowDialog = true; | 
|     } | 
|   | 
|     // 上传附件Url | 
|     // upLoadUrl: function() { | 
|     //   var domain = this.common.domain; | 
|     //   return domain + "/api/common/uploadSingleFile"; | 
|     // }, | 
|     // 开始导入 | 
|     // submitImport() { | 
|     //   this.msgList = null; | 
|     //   if (!this.fullFileRote) { | 
|     //     this.$message.error("请上传文件!"); | 
|     //     return; | 
|     //   } | 
|     //   const url = "/api/tms/waypackageimport/importExcel"; | 
|     //   const params = { | 
|     //     url: this.fullFileRote, | 
|     //     key: this.uploadKey | 
|     //   }; | 
|     //   var callback = res => { | 
|     //     this.common.showMsg(res); | 
|     //     if (res.result) { | 
|     //       this.fullFileRote = null; | 
|     //       this.fileList = []; | 
|     //       this.msgList = res.msg; | 
|     //     } else { | 
|     //       this.msgList = "<font color='red'>" + res.msg + "</font>"; | 
|     //     } | 
|     //   }; | 
|     //   this.common.ajax(url, params, callback, true); | 
|     // }, | 
|     // handleRemove(file, fileList) { | 
|     //   this.fullFileRote = null; | 
|     // }, | 
|     // // 点击文件时的钩子 | 
|     // handlePreview(file) {}, | 
|     // // 上传成功后 | 
|     // handleSuccess(res, file) { | 
|     //   this.common.showMsg("上传成功!"); | 
|     //   this.fullFileRote = res.data.url; | 
|     // } | 
|   } | 
| }; | 
| </script> | 
|   | 
| <style lang="scss" scoped> | 
| .box-card { | 
|   .upload-bill { | 
|     width: 480px; | 
|     .el-upload__tip { | 
|       margin-top: 20px; | 
|     } | 
|   } | 
|   .scrollbar-wrap { | 
|     max-height: 600px !important; | 
|   } | 
| } | 
| </style> |