diff --git a/src/views/modules/common/excelUpload.vue b/src/views/modules/common/excelUpload.vue index 3778ceb..d60c703 100644 --- a/src/views/modules/common/excelUpload.vue +++ b/src/views/modules/common/excelUpload.vue @@ -20,38 +20,34 @@ url: '', num: 0, successNum: 0, - fileList: [] + fileList: [], + rollList: {} } }, methods: { init (id) { - this.url = this.$http.adornUrl(`/excel/file/upload?token=${this.$cookie.get('token')}&folder=`+this.folder) - console.log(this.url) + this.url = this.$http.adornUrl(`/file/excel/upload?token=${this.$cookie.get('token')}`) this.visible = true }, // 上传之前 beforeUploadHandle (file) { - // if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') { - // this.$message.error('只支持jpg、png、gif格式的图片!') - // return false - // } + if (file.type !== "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" && file.type !== "application/vnd.ms-excel" ) { + this.$message.error('只支持xls、xlsx、格式的文件!') + return false + } this.num++ }, // 上传成功 successHandle (response, file, fileList) { - this.fileList = fileList.map(item => { - return item.response.ossEntity - }) - this.successNum++ if (response && response.code === 0) { + this.rollList = response this.childClick() } else { this.$message.error(response.msg) } }, childClick () { - // childByValue是在父组件on监听的方法 - this.$emit('childByValue', this.fileList) + this.$emit('excelUploadChild', this.rollList) } }, created() { diff --git a/src/views/modules/finishedProductWarehouse/otherOut.vue b/src/views/modules/finishedProductWarehouse/otherOut.vue index a1c5b36..90b3f53 100644 --- a/src/views/modules/finishedProductWarehouse/otherOut.vue +++ b/src/views/modules/finishedProductWarehouse/otherOut.vue @@ -2,29 +2,12 @@
- +
- {{buttons.search}} - {{buttons.defaultTable}} - - {{ buttons.settingTable}} - - - - - - - - - - - - - - + - {{ buttons.search }} + @@ -52,281 +35,239 @@ - +