add:加价管理-分类加价-下拉框上可以搜索-可以多选
| | |
| | | import { getGoodsCategoryListConfig } from '@/utils/form-item-config' |
| | | |
| | | export default { |
| | | props: { |
| | | multiple: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | tableConfig: { |
| | | url: 'flower/api/flower/markup/spcg/list', |
| | | newUrl: 'flower/api/flower/markup/spcg/list/save', |
| | | newUrl: 'flower/api/flower/markup/spcg/list/save/batch', |
| | | editUrl: 'flower/api/flower/markup/spcg/list/save', |
| | | onDelete: (row) => { |
| | | return this.$elBusHttp.request( |
| | |
| | | ], |
| | | form: [ |
| | | { |
| | | ...getGoodsCategoryListConfig(true), |
| | | ...getGoodsCategoryListConfig(true, this.multiple), |
| | | rules: { required: true, message: '请选择商品分类' }, |
| | | str: true, |
| | | strKey: 'name', |
| | |
| | | } |
| | | } |
| | | |
| | | export const getGoodsCategoryListConfig = (checkStrictly = false) => { |
| | | export const getGoodsCategoryListConfig = (checkStrictly = false, multiple = false) => { |
| | | return { |
| | | label: '商品分类:', |
| | | id: 'categoryId', |
| | |
| | | value: 'id', |
| | | emitPath: false, |
| | | checkStrictly, |
| | | multiple, |
| | | }, |
| | | filterable: true, |
| | | clearable: true, |
| | | style: 'width:100%', |
| | | }, |