|
@@ -30,11 +30,12 @@ import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import ImageUpload from '@/components/file-upload'
|
|
|
import { downloadFiles } from '@/utils/util'
|
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
|
-import { listPageV2, pageExport, getDetail, add, edit, submit } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
|
|
|
+import { listPageV2, pageExport, getDetail, add, edit, submit, listImport } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
|
|
|
import { getWebsit } from "@/api/customerManagement";
|
|
|
import printPreview from '../components/preview.vue'
|
|
|
import { disAutoConnect, hiprint } from 'vue-plugin-hiprint'
|
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
+import { commonTemplateDownload } from '@/api/common.js'
|
|
|
disAutoConnect()
|
|
|
export default {
|
|
|
components: { TemplatePage, ImageUpload, attachmentSalesOrderDetail, printPreview },
|
|
@@ -74,6 +75,22 @@ export default {
|
|
|
click: this.addData
|
|
|
}),
|
|
|
]
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ this.optionsEvensAuth("imp", {
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(listImport, '导入')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ this.optionsEvensAuth("template", {
|
|
|
+ click: () => {
|
|
|
+ this.handleDownload()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ]
|
|
|
]
|
|
|
]
|
|
|
},
|
|
@@ -381,7 +398,14 @@ export default {
|
|
|
},
|
|
|
// 下载导入模版
|
|
|
handleDownload() {
|
|
|
- // downloadFiles('charging/standard/download');
|
|
|
+ commonTemplateDownload({ name: '师傅分销员资料初始化.xlsx' }, `${this.$route.meta.title}`).then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '下载成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ }).catch(err => {
|
|
|
+ this.$message.error('下载失败')
|
|
|
+ })
|
|
|
},
|
|
|
}
|
|
|
}
|