|
@@ -64,7 +64,8 @@
|
|
|
|
|
|
<Dialog title="商品列表" v-model="showSpu" style="width: 70%;">
|
|
|
<div style="display: inline-block; width: 100%;">
|
|
|
- <SpuList ref="spuRef" :multiple="true" :select="formData.factorInfo" />
|
|
|
+ <!-- <SpuList ref="spuRef" :multiple="true" :select="formData.factorInfo" /> -->
|
|
|
+ <SpuList @select="handleSelectSpu" />
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<el-button @click="handleSubmitSpu" type="primary" :disabled="formLoading">确 定</el-button>
|
|
@@ -154,6 +155,11 @@
|
|
|
showSpu.value = false
|
|
|
}
|
|
|
|
|
|
+ const handleSelectSpu = (row: any) => {
|
|
|
+ formData.value.factorInfo[0] = row
|
|
|
+ showSpu.value = false
|
|
|
+ }
|
|
|
+
|
|
|
/** 提交表单 */
|
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
|
const submitForm = async () => {
|