|
@@ -20,7 +20,7 @@
|
|
|
</el-select>
|
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
|
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleDownLoad">导出</el-button>
|
|
|
- <el-button class="filter-item" type="primary" v-waves icon="el-icon-upload2" @click="handleUpload">导入</el-button>
|
|
|
+ <el-button class="filter-item" type="primary" v-waves icon="el-icon-upload2" @click="handleUpload">批量导入审批</el-button>
|
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleDownLoadPlate">模版下载</el-button>
|
|
|
|
|
|
</div>
|
|
@@ -225,6 +225,7 @@
|
|
|
|
|
|
<script>
|
|
|
import axios from 'axios';
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
import { complete, list, detail } from "@/api/exchangeManage";
|
|
|
import { dataTypeList } from "@/api/public";
|
|
|
import waves from "@/directive/waves"; // 水波纹指令
|
|
@@ -236,7 +237,6 @@ export default {
|
|
|
directives: { waves },
|
|
|
data() {
|
|
|
return {
|
|
|
- upLoadApi:'https://xiaoyou.dgtis.com/admin/storage/create',
|
|
|
productAttributeList: [],
|
|
|
deliveryTypeList: [ ],
|
|
|
orderTypeList: [
|
|
@@ -294,24 +294,27 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleDownLoadPlate(){
|
|
|
- window.location.href = process.env.BASE_API + '/mall-order/exportOrderLog';
|
|
|
+ window.location.href = process.env.BASE_API + '/mall-order/downExcelTemplate';
|
|
|
},
|
|
|
submitUploadFile(){
|
|
|
console.log(this.$refs.uploadFile.files);
|
|
|
let fileFormData = new FormData();
|
|
|
- fileFormData.append('File',this.$refs.uploadFile.files[0]);
|
|
|
+ fileFormData.append('upfile',this.$refs.uploadFile.files[0]);
|
|
|
let requestConfig = {
|
|
|
headers: {
|
|
|
- "Content-Type": "multipart/form-data"
|
|
|
+ "Content-Type": "multipart/form-data",
|
|
|
+ 'X-Token': getToken()
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
- const instance = axios.create({
|
|
|
- withCredentials: true
|
|
|
- })
|
|
|
-
|
|
|
- instance.post(this.upLoadApi,fileFormData,requestConfig ).then(res=>{
|
|
|
- this.$message.success('上传成功!')
|
|
|
+ let upLoadApi = process.env.BASE_API + '/mall-order/batchAudit';
|
|
|
+ axios.post(upLoadApi,fileFormData,requestConfig ).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ if(res.errno){
|
|
|
+ this.$message.success(res.errmsg);
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.errmsg);
|
|
|
+ }
|
|
|
+
|
|
|
})
|
|
|
this.getList();
|
|
|
this.uploadVisible = false;
|