|
@@ -24,7 +24,7 @@ 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 { getBrand } from '@/api/goods'
|
|
|
+import { commonTemplateDownload } from '@/api/common.js'
|
|
|
export default {
|
|
|
components: { TemplatePage, ImageUpload },
|
|
|
mixins: [import_mixin],
|
|
@@ -60,22 +60,22 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
],
|
|
|
- // [
|
|
|
- // [
|
|
|
- // {
|
|
|
- // name: '下载导入模板',
|
|
|
- // click: this.handleDownload
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // [
|
|
|
- // {
|
|
|
- // name: '导入模板',
|
|
|
- // render: () => {
|
|
|
- // return this.importButton(listImport, '导入模板')
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '下载导入模板',
|
|
|
+ click: this.handleDownload
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '导入模板',
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(listImport, '导入模板')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ ],
|
|
|
],
|
|
|
// 表格属性
|
|
|
tableAttributes: {
|
|
@@ -233,8 +233,8 @@ export default {
|
|
|
md: 24,
|
|
|
isShow: this.formData.normType == 'M'?true:false,
|
|
|
name: 'el-checkbox-add',
|
|
|
- labelKey: 'brandName',
|
|
|
- valueKey: 'brandName',
|
|
|
+ labelKey: 'dictValue',
|
|
|
+ valueKey: 'dictCode',
|
|
|
attributes: {},
|
|
|
options: this.brandList,
|
|
|
formItemAttributes: {
|
|
@@ -512,11 +512,6 @@ export default {
|
|
|
this[type] = res.data.records
|
|
|
})
|
|
|
},
|
|
|
- getBrand(){
|
|
|
- getBrand().then(res => {
|
|
|
- this.brandList = res.data
|
|
|
- })
|
|
|
- },
|
|
|
getCategoryList(){
|
|
|
getCategoryList({"type":2}).then(res => {
|
|
|
this.categoryList = res.data
|
|
@@ -581,8 +576,7 @@ export default {
|
|
|
},
|
|
|
openForm() {
|
|
|
this.getTypeList('PARTS_UNIT','partsUnitList')
|
|
|
- // this.getTypeList('BRAND','brandList')
|
|
|
- this.getBrand()
|
|
|
+ this.getTypeList('BRAND','brandList')
|
|
|
this.getCategoryList()
|
|
|
this.formDialog = true;
|
|
|
},
|
|
@@ -627,6 +621,14 @@ export default {
|
|
|
},
|
|
|
// 下载导入模版
|
|
|
handleDownload() {
|
|
|
+ commonTemplateDownload({ name: '配件模板(服务收费).xlsx' }, `${this.$route.meta.title}`).then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '下载成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ }).catch(err => {
|
|
|
+ this.$message.error('下载失败')
|
|
|
+ })
|
|
|
// downloadFiles('charging/standard/download');
|
|
|
},
|
|
|
}
|