|
@@ -23,7 +23,7 @@ import import_mixin from '@/components/template/import_mixin.js'
|
|
import ImageUpload from '@/components/file-upload'
|
|
import ImageUpload from '@/components/file-upload'
|
|
import { downloadFiles } from '@/utils/util'
|
|
import { downloadFiles } from '@/utils/util'
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
-import { listPageV2,pageExport, getDetail, add, edit, updateStatus, listImport } from "@/api/auxiliaryFittings/attachmentProfile";
|
|
|
|
|
|
+import { listPageV2,pageExport, getDetail, add, edit, updateStatus, listImport, getTypeList } from "@/api/auxiliaryFittings/attachmentProfile";
|
|
export default {
|
|
export default {
|
|
components: { TemplatePage, ImageUpload },
|
|
components: { TemplatePage, ImageUpload },
|
|
mixins: [import_mixin],
|
|
mixins: [import_mixin],
|
|
@@ -95,7 +95,10 @@ export default {
|
|
brandList: [],
|
|
brandList: [],
|
|
categoryList: [],
|
|
categoryList: [],
|
|
partsUnitName: ''
|
|
partsUnitName: ''
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ partsUnitList: [],
|
|
|
|
+ brandList: [],
|
|
|
|
+ categoryList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -147,25 +150,9 @@ export default {
|
|
md: 12,
|
|
md: 12,
|
|
isShow: true,
|
|
isShow: true,
|
|
name: 'el-select-add',
|
|
name: 'el-select-add',
|
|
- options: [{
|
|
|
|
- label: `通用`,
|
|
|
|
- value: "通用"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: `格力`,
|
|
|
|
- value: "格力"
|
|
|
|
- },{
|
|
|
|
- label: `美的`,
|
|
|
|
- value: "美的"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: `海尔`,
|
|
|
|
- value: "海尔"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: `华凌`,
|
|
|
|
- value: "华凌"
|
|
|
|
- }],
|
|
|
|
|
|
+ // labelKey: 'dictTypeName',
|
|
|
|
+ // valueKey: 'dictTypeName',
|
|
|
|
+ options: this.partsUnitList,
|
|
attributes: { placeholder: '请选择单位',filterable: true },
|
|
attributes: { placeholder: '请选择单位',filterable: true },
|
|
formItemAttributes: {
|
|
formItemAttributes: {
|
|
label: '单位',
|
|
label: '单位',
|
|
@@ -210,26 +197,10 @@ export default {
|
|
md: 24,
|
|
md: 24,
|
|
isShow: true,
|
|
isShow: true,
|
|
name: 'el-checkbox-add',
|
|
name: 'el-checkbox-add',
|
|
|
|
+ // labelKey: 'dictTypeName',
|
|
|
|
+ // valueKey: 'dictTypeName',
|
|
attributes: {},
|
|
attributes: {},
|
|
- options: [{
|
|
|
|
- label: `通用`,
|
|
|
|
- value: "通用"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: `格力`,
|
|
|
|
- value: "格力"
|
|
|
|
- },{
|
|
|
|
- label: `美的`,
|
|
|
|
- value: "美的"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: `海尔`,
|
|
|
|
- value: "海尔"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: `华凌`,
|
|
|
|
- value: "华凌"
|
|
|
|
- }],
|
|
|
|
|
|
+ options: this.brandList,
|
|
formItemAttributes: {
|
|
formItemAttributes: {
|
|
label: '适用品牌',
|
|
label: '适用品牌',
|
|
prop: 'brandList',
|
|
prop: 'brandList',
|
|
@@ -239,15 +210,10 @@ export default {
|
|
md: 24,
|
|
md: 24,
|
|
isShow: true,
|
|
isShow: true,
|
|
name: 'el-checkbox-add',
|
|
name: 'el-checkbox-add',
|
|
|
|
+ // labelKey: 'dictTypeName',
|
|
|
|
+ // valueKey: 'dictTypeName',
|
|
attributes: {},
|
|
attributes: {},
|
|
- options: [{
|
|
|
|
- label: `通用`,
|
|
|
|
- value: "通用"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: `家用空调`,
|
|
|
|
- value: "家用空调"
|
|
|
|
- }],
|
|
|
|
|
|
+ options: this.categoryList,
|
|
formItemAttributes: {
|
|
formItemAttributes: {
|
|
label: '适用产品大类',
|
|
label: '适用产品大类',
|
|
prop: 'categoryList',
|
|
prop: 'categoryList',
|
|
@@ -326,6 +292,11 @@ export default {
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ this.getTypeList('PARTS_UNIT','partsUnitList')
|
|
|
|
+ this.getTypeList('PARTS_UNIT','brandList')
|
|
|
|
+ this.getTypeList('PARTS_UNIT','categoryList')
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 列表请求函数
|
|
// 列表请求函数
|
|
getList(p) {
|
|
getList(p) {
|
|
@@ -339,6 +310,11 @@ export default {
|
|
console.log(error)
|
|
console.log(error)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ getTypeList(value,type){
|
|
|
|
+ getTypeList({"pageNum":1,"pageSize":-1,"params":[{"param":"a.dict_type","compare":"=","value":`${value}`},{"param":"a.status","compare":"=","value": "ON"}]}).then(res => {
|
|
|
|
+ this[type] = res.data.records
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 列表导出函数
|
|
// 列表导出函数
|
|
exportList: pageExport,
|
|
exportList: pageExport,
|
|
// 表格列解析渲染数据更改
|
|
// 表格列解析渲染数据更改
|
|
@@ -378,6 +354,7 @@ export default {
|
|
addData() {
|
|
addData() {
|
|
this.formDialogType = 0
|
|
this.formDialogType = 0
|
|
this.openForm()
|
|
this.openForm()
|
|
|
|
+ console.log(this.partsUnitList,this.brandList,this.categoryList)
|
|
},
|
|
},
|
|
openForm() {
|
|
openForm() {
|
|
this.formDialog = true;
|
|
this.formDialog = true;
|