| | |
| | | disabled: false, |
| | | modelValue: undefined, |
| | | multiple: false, |
| | | placeholder: '请选择产品物料', |
| | | placeholder: '请选择产品品种', |
| | | productIds: () => [], |
| | | }, |
| | | ); |
| | |
| | | : props.modelValue != null), |
| | | ); |
| | | |
| | | /** 根据物料编号回显选择器 */ |
| | | /** 根据品种编号回显选择器 */ |
| | | async function resolveItemsById(values: number | number[] | undefined) { |
| | | if (values == null || (Array.isArray(values) && values.length === 0)) { |
| | | selectedItems.value = []; |
| | |
| | | { immediate: true }, |
| | | ); |
| | | |
| | | /** 清空已选物料 */ |
| | | /** 清空已选品种 */ |
| | | function clearSelected() { |
| | | selectedItems.value = []; |
| | | if (props.multiple) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** 打开物料选择弹窗 */ |
| | | /** 打开品种选择弹窗 */ |
| | | function handleClick(event: MouseEvent) { |
| | | if (props.disabled) { |
| | | return; |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 回填选中的物料 */ |
| | | /** 回填选中的品种 */ |
| | | function handleSelected(rows: MesMdItemApi.Item[]) { |
| | | if (props.multiple) { |
| | | selectedItems.value = rows; |