feat(mes): 物料新增颜色字段 - 表单/列表/搜索/选择弹窗/BOM 全链路展示
1. 物料表单新增「颜色」输入项,列表新增颜色列,搜索条件支持按颜色筛选
2. 物料选择弹窗(生产流程各处选料)新增颜色列与颜色搜索,选中回显与 Tooltip 均显示颜色
3. 产品 BOM 子表新增颜色列
| | |
| | | code?: string; // 物料编码 |
| | | name?: string; // 物料名称 |
| | | specification?: string; // 规格型号 |
| | | color?: string; // 颜色 |
| | | unitMeasureId?: number; // 计量单位编号 |
| | | unitMeasureName?: string; // 计量单位名称 |
| | | itemTypeId?: number; // 物料分类编号 |
| | |
| | | const displayLabel = computed(() => { |
| | | if (selectedItems.value.length === 0) return ''; |
| | | return selectedItems.value.map(item => |
| | | [item.name, item.specification, item.code ? `(${item.code})` : ''].filter(Boolean).join(' '), |
| | | [item.name, item.specification, item.color, item.code ? `(${item.code})` : ''] |
| | | .filter(Boolean) |
| | | .join(' '), |
| | | ).join('、'); |
| | | }); |
| | | const showClear = computed( |
| | |
| | | <div>编码:{{ selectedItems[0].code || '-' }}</div> |
| | | <div>名称:{{ selectedItems[0].name || '-' }}</div> |
| | | <div>规格:{{ selectedItems[0].specification || '-' }}</div> |
| | | <div>颜色:{{ selectedItems[0].color || '-' }}</div> |
| | | <div>单位:{{ selectedItems[0].unitMeasureName || '-' }}</div> |
| | | </div> |
| | | <div v-else-if="selectedItems.length > 1" class="leading-6"> |
| | |
| | | <div>编码:{{ item.code || '-' }}</div> |
| | | <div>名称:{{ item.name || '-' }}</div> |
| | | <div>规格:{{ item.specification || '-' }}</div> |
| | | <div>颜色:{{ item.color || '-' }}</div> |
| | | <div>单位:{{ item.unitMeasureName || '-' }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'color', |
| | | label: '颜色', |
| | | component: 'Input', |
| | | componentProps: { |
| | | maxLength: 64, |
| | | placeholder: '请输入颜色,用于区分同型号不同颜色的物料', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'unitMeasureId', |
| | | label: '单位', |
| | | component: markRaw(MdUnitMeasureSelect), |
| | |
| | | componentProps: { allowClear: true, placeholder: '请输入规格型号' }, |
| | | }, |
| | | { |
| | | fieldName: 'color', |
| | | label: '颜色', |
| | | component: 'Input', |
| | | componentProps: { allowClear: true, placeholder: '请输入颜色' }, |
| | | }, |
| | | { |
| | | fieldName: 'status', |
| | | label: '状态', |
| | | component: 'Select', |
| | |
| | | field: 'specification', |
| | | title: '规格型号', |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | field: 'color', |
| | | title: '颜色', |
| | | width: 110, |
| | | align: 'center', |
| | | }, |
| | | { |
| | | field: 'unitMeasureName', |
| | |
| | | component: 'Input', |
| | | componentProps: { allowClear: true, placeholder: '请输入规格型号' }, |
| | | }, |
| | | { |
| | | fieldName: 'color', |
| | | label: '颜色', |
| | | component: 'Input', |
| | | componentProps: { allowClear: true, placeholder: '请输入颜色' }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | title: '规格型号', |
| | | minWidth: 140, |
| | | align: 'left', |
| | | }, |
| | | { |
| | | field: 'color', |
| | | title: '颜色', |
| | | width: 100, |
| | | align: 'center', |
| | | }, |
| | | { |
| | | field: 'unitMeasureName', |
| | |
| | | align: 'center', |
| | | }, |
| | | { |
| | | field: 'bomItemColor', |
| | | title: '颜色', |
| | | width: 100, |
| | | align: 'center', |
| | | }, |
| | | { |
| | | field: 'unitMeasureName', |
| | | title: '单位', |
| | | width: 80, |