feat: 修改商品列表的筛选
This commit is contained in:
@@ -109,7 +109,6 @@ async function handleAddClick() {
|
|||||||
}
|
}
|
||||||
// 上架
|
// 上架
|
||||||
function handleSwitchChange(data: any) {
|
function handleSwitchChange(data: any) {
|
||||||
console.log(data, '条似乎22222')
|
|
||||||
let obj = {
|
let obj = {
|
||||||
type: data.isGrounding ? 'sku' : 'product',
|
type: data.isGrounding ? 'sku' : 'product',
|
||||||
id: data.id,
|
id: data.id,
|
||||||
|
|||||||
@@ -34,32 +34,38 @@ const searchConfig: ISearchConfig = {
|
|||||||
formItem.options = await UserAPI.getList();
|
formItem.options = await UserAPI.getList();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
type: "tree-select",
|
type: "select",
|
||||||
label: "商品规格",
|
label: "商品类型",
|
||||||
prop: "specId",
|
prop: "type",
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: "请选择商品规格",
|
placeholder: "请选择商品类型",
|
||||||
data: [],
|
|
||||||
filterable: true,
|
|
||||||
"check-strictly": true,
|
|
||||||
"render-after-expand": false,
|
|
||||||
clearable: true,
|
clearable: true,
|
||||||
style: {
|
style: {
|
||||||
width: "200px",
|
width: "200px",
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
label: 'name', // 指定节点显示的文本字段为 name
|
|
||||||
value: 'id' // 指定节点的值字段为 id
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async initFn(formItem) {
|
|
||||||
formItem.attrs.data = await DeptAPI.getPage();
|
|
||||||
// 注意:如果initFn函数不是箭头函数,this会指向此配置项对象,那么也就可以用this来替代形参formItem
|
|
||||||
// this.attrs!.data = await DeptAPI.getOptions();
|
|
||||||
},
|
},
|
||||||
|
options: [{
|
||||||
|
label: "单规格商品",
|
||||||
|
value: "single"
|
||||||
|
}, {
|
||||||
|
label: "多规格商品",
|
||||||
|
value: "sku"
|
||||||
|
}, {
|
||||||
|
label: "套餐商品",
|
||||||
|
value: "package"
|
||||||
|
}, {
|
||||||
|
label: "称重商品",
|
||||||
|
value: "weight"
|
||||||
|
}, {
|
||||||
|
label: "团购券",
|
||||||
|
value: "coupon"
|
||||||
|
}],
|
||||||
|
// async initFn(formItem) {
|
||||||
|
// formItem.options = await UserAPI.getList();
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
type: "date-picker",
|
type: "date-picker",
|
||||||
label: "日期",
|
label: "日期",
|
||||||
|
|||||||
Reference in New Issue
Block a user