| | |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | customerId: active.id, |
| | | customer: active.customerShortName, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | productCode: { |
| | | label: '货品编码', |
| | |
| | | } |
| | | }) |
| | | |
| | | onMounted(() => { |
| | | watch(() => form.value.customerId, () => { |
| | | |
| | | if (!form.value.customerId){ |
| | | return; |
| | | } |
| | | const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp; |
| | | if (!table) return; |
| | | |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | customerId: active.id, |
| | | customer: active.customerShortName, |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | </script> |