Commit 44c5ea6b by gyt

feat(consignmentRecall): 导入接口添加请求头

parent 44ec440d
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="operation-button row verCenter"> <div class="operation-button row verCenter">
<el-button type="primary" @click="$router.push('/createConsignmentRecallOrder')">生成寄售召回单</el-button> <el-button type="primary" @click="$router.push('/createConsignmentRecallOrder')">生成寄售召回单</el-button>
<el-button type="danger" @click="popupEvent(2)">作废</el-button> <el-button type="danger" @click="popupEvent(2)">作废</el-button>
<el-upload :action="batchRecallUpload" :on-success="handleUploadSuccess" :on-error="handleUploadError" :before-upload="handleBeforeUpload" accept=".xlsx,.xls" :show-file-list="false" name="file" style="display: inline-block; margin-left: 10px;"> <el-upload :action="batchRecallUpload" :headers="uploadHeaders" :on-success="handleUploadSuccess" :on-error="handleUploadError" :before-upload="handleBeforeUpload" accept=".xlsx,.xls" :show-file-list="false" name="file" style="display: inline-block; margin-left: 10px;">
<el-button type="primary" :loading="uploadLoading">导入</el-button> <el-button type="primary" :loading="uploadLoading">导入</el-button>
</el-upload> </el-upload>
<a href="http://cloud.liexindev.net/template/批量召回模板.xlsx" download style="text-decoration: none; margin-left: 10px;"> <a href="http://cloud.liexindev.net/template/批量召回模板.xlsx" download style="text-decoration: none; margin-left: 10px;">
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
import { Autocomplete, Button, Cascader, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip, Upload } from 'element-ui' import { Autocomplete, Button, Cascader, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip, Upload } from 'element-ui'
import { pcaTextArr } from 'element-china-area-data' import { pcaTextArr } from 'element-china-area-data'
import { NODE_ENVS } from "@/ajax/index" import { NODE_ENVS } from "@/ajax/index"
import Util from "@/tool/index.js"
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
...@@ -120,6 +121,9 @@ ...@@ -120,6 +121,9 @@
data() { data() {
return { return {
batchRecallUpload: NODE_ENVS + '/api/consignmentRecall/batchRecallUpload', batchRecallUpload: NODE_ENVS + '/api/consignmentRecall/batchRecallUpload',
uploadHeaders: {
'Authorization': 'Bearer ' + Util.getCookie('token') || ''
},
options: pcaTextArr, options: pcaTextArr,
selectedOptions: ['广东省', '深圳市', '龙岗区'], selectedOptions: ['广东省', '深圳市', '龙岗区'],
multipleSelection: [], multipleSelection: [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment