|
|
|
@ -101,6 +101,22 @@
|
|
|
|
|
v-if="handler" |
|
|
|
|
>修改服务类型</el-button |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
<!-- <el-button type="danger"--> |
|
|
|
|
<!-- icon="el-icon-delete"--> |
|
|
|
|
<!-- @click="handleImport">导 入--> |
|
|
|
|
<!-- </el-button>--> |
|
|
|
|
|
|
|
|
|
<el-dialog title="零担导入" append-to-body v-model="excelBox" width="555px"> |
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
|
|
|
|
<template #excelTemplate> |
|
|
|
|
<el-button type="primary" @click="handleTemplate"> |
|
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-form> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-plus" v-if = "handler">转配送</el-button>--> |
|
|
|
|
</div> |
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
@ -406,10 +422,40 @@ import { mapGetters } from 'vuex';
|
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { getUser } from '@/api/system/user'; |
|
|
|
|
import { exportBlob } from '@/api/common'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
excelForm: {}, |
|
|
|
|
excelBox: false, |
|
|
|
|
excelOption: { |
|
|
|
|
submitBtn: false, |
|
|
|
|
emptyBtn: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: '文件上传', |
|
|
|
|
prop: 'excelFile', |
|
|
|
|
type: 'upload', |
|
|
|
|
drag: true, |
|
|
|
|
loadText: '文件上传,请稍等', |
|
|
|
|
span: 24, |
|
|
|
|
propsHttp: { |
|
|
|
|
res: 'data', |
|
|
|
|
}, |
|
|
|
|
tip: '请上传 .xls,.xlsx 标准格式文件', |
|
|
|
|
action: '/api/logpm-distribution/distributionStockArticle/import-stockArticle', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '模板下载', |
|
|
|
|
prop: 'excelTemplate', |
|
|
|
|
formslot: true, |
|
|
|
|
span: 24, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
columnList: [ |
|
|
|
|
{ |
|
|
|
|
prop: '', |
|
|
|
@ -1033,6 +1079,26 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
uploadAfter(res, done, loading, column) { |
|
|
|
|
window.console.log(column); |
|
|
|
|
this.excelBox = false; |
|
|
|
|
this.refreshChange(); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
handleImport() { |
|
|
|
|
this.excelBox = true; |
|
|
|
|
}, |
|
|
|
|
handleTemplate() { |
|
|
|
|
exportBlob( |
|
|
|
|
`/api/logpm-distribution/distributionStockArticle/import-stockArticle?${this.website.tokenHeader}=${getToken()}` |
|
|
|
|
).then(res => { |
|
|
|
|
downloadXls(res.data, '用户数据模板.xlsx'); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
showdrawer(value) { |
|
|
|
|
this.drawerShow = value; |
|
|
|
|
}, |
|
|
|
|