Browse Source

配件模板

pengyh 1 năm trước cách đây
mục cha
commit
88030f7403

+ 5 - 1
src/api/auxiliaryFittings/attachmentProfile.js

@@ -72,6 +72,10 @@ export function getCategoryList(params) {
   })
 }
 
-export function listImport(data) {
+export function listImport1(data) {
+	return handleImport('/websit/goods/p/import1', data.formdata, data.id || '')
+}
+
+export function listImport2(data) {
 	return handleImport('/websit/goods/p/import2', data.formdata, data.id || '')
 }

+ 33 - 6
src/views/auxiliaryFittings/attachmentProfile/index.vue

@@ -23,7 +23,7 @@ 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, updateStatus, listImport, getTypeList, getCategoryList } from "@/api/auxiliaryFittings/attachmentProfile";
+import { listPageV2,pageExport, getDetail, add, edit, updateStatus, listImport1, listImport2, getTypeList, getCategoryList } from "@/api/auxiliaryFittings/attachmentProfile";
 import { commonTemplateDownload } from '@/api/common.js'
 export default {
   components: { TemplatePage, ImageUpload },
@@ -61,17 +61,33 @@ export default {
 			]
 		],
 		[
+		  [
+		    {
+		      name: '下载配件物料导入模板',
+		      click: this.handleDownload1
+		    }
+		  ],
+		  [
+		    {
+		      name: '导入配件物料模板',
+		      render: () => {
+		        return this.importButton(listImport1, '导入模板')
+		      }
+		    }
+		  ],
+		],
+		[
           [
             {
-              name: '下载导入模板',
-              click: this.handleDownload
+              name: '下载服务收费导入模板',
+              click: this.handleDownload2
             }
           ],
           [
             {
-              name: '导入模板',
+              name: '导入服务收费模板',
               render: () => {
-                return this.importButton(listImport, '导入模板')
+                return this.importButton(listImport2, '导入模板')
               }
             }
           ],
@@ -620,7 +636,18 @@ export default {
       })
     },
 	// 下载导入模版
-	handleDownload() {
+	handleDownload1() {
+		commonTemplateDownload({ name: '配件模板(配件物料).xlsx' }, `${this.$route.meta.title}`).then(res => {
+		    this.$message({
+		        message: '下载成功',
+		        type: 'success'
+		    })
+		}).catch(err => {
+		    this.$message.error('下载失败')
+		})
+	  // downloadFiles('charging/standard/download');
+	},
+	handleDownload2() {
 		commonTemplateDownload({ name: '配件模板(服务收费).xlsx' }, `${this.$route.meta.title}`).then(res => {
 		    this.$message({
 		        message: '下载成功',