feat: select result service product list quotation
This commit is contained in:
parent
23dc6858c6
commit
2bdd524915
2 changed files with 53 additions and 14 deletions
|
|
@ -73,6 +73,7 @@ import {
|
|||
} from 'src/pages/03_customer-management/form';
|
||||
import QuotationView from './QuotationView.vue';
|
||||
import { watch } from 'vue';
|
||||
import { toRaw } from 'vue';
|
||||
|
||||
const quotationFormStore = useQuotationForm();
|
||||
const customerFormStore = useCustomerForm();
|
||||
|
|
@ -1586,6 +1587,20 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
|||
await getAllProduct(id);
|
||||
}
|
||||
"
|
||||
@submit="
|
||||
(node) => {
|
||||
const nodeRecursive = (
|
||||
v: (typeof node)[number],
|
||||
): typeof node | (typeof node)[number] => {
|
||||
if (v.checked && v.children) return v.children.flatMap(nodeRecursive);
|
||||
if (v.checked) return v;
|
||||
return [];
|
||||
};
|
||||
|
||||
const filtered = node.flatMap(nodeRecursive);
|
||||
console.log(JSON.parse(JSON.stringify(filtered.map((v) => v.value))));
|
||||
}
|
||||
"
|
||||
></ProductServiceForm>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue