feat: 修改添加分组选择商品默认勾选

This commit is contained in:
duan 2025-03-12 15:20:22 +08:00
parent c7084f4c34
commit b5088c1497
1 changed files with 4 additions and 1 deletions

View File

@ -88,7 +88,7 @@
<myDialog title="选择商品" width="50%" ref="myDialogRef" @Confirm="subitgood"> <myDialog title="选择商品" width="50%" ref="myDialogRef" @Confirm="subitgood">
<page-search ref="searchRefs" :search-config="searchConfig2" @query-click="searchs" <page-search ref="searchRefs" :search-config="searchConfig2" @query-click="searchs"
@reset-click="handleResetClick" /> @reset-click="handleResetClick" />
<page-content ref="contentRefs" :content-config="contentConfig2" @add-click="handleAddClick" <page-content ref="contentRefs" v-if="switchref" :content-config="contentConfig2" @add-click="handleAddClick"
@edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick" @edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick"
@toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange"> @toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange">
<template #status="scope"> <template #status="scope">
@ -184,6 +184,7 @@ const {
handleFilterChange, handleFilterChange,
} = usePage(); } = usePage();
let switchref = ref(false)
// //
async function handleAddClick() { async function handleAddClick() {
@ -211,6 +212,7 @@ let forms = reactive({
// //
function addgoods() { function addgoods() {
switchref.value = true
myDialogRef.value.open() myDialogRef.value.open()
} }
const rules = reactive<FormRules<RuleForm>>({ const rules = reactive<FormRules<RuleForm>>({
@ -269,6 +271,7 @@ async function addConfirm() {
// //
function subitgood() { function subitgood() {
selectData.value = contentRefs.value.getselectTable() selectData.value = contentRefs.value.getselectTable()
switchref.value = false
myDialogRef.value.close() myDialogRef.value.close()
} }
// //