| | |
| | | }, |
| | | columns:[ |
| | | {title: '', width: '110', slots: { default: 'button_slot' },fixed:'left'}, |
| | | {field:'id',title: '物料编号', }, |
| | | {field: 'name', title: '物料名称'}, |
| | | {field: 'thickness', title: '厚度'}, |
| | | {field: 'width', title: '宽'}, |
| | | {field: 'height', title: '高'}, |
| | | {field:'consume',title: '消耗量' }, |
| | | {field:'unit',title: '单位' }, |
| | | {field:'price',title: '价格' } |
| | | {field:'id',title: t('ingredients.materialCode') }, |
| | | {field: 'name', title: t('ingredientsStock.materialName')}, |
| | | {field: 'thickness', title: t('product.msg.allThickness')}, |
| | | {field: 'width', title: t('order.width')}, |
| | | {field: 'height', title: t('order.height')}, |
| | | {field:'consume',title: t('bom.consume') }, |
| | | {field:'unit',title: t('ingredients.unit') }, |
| | | {field:'price',title: t('bom.price1') } |
| | | ],//表头参数 |
| | | data:[ |
| | | |
| | |
| | | {title: t('basicData.add'), width: '110', slots: { default: 'button_slot' },fixed:'left'}, |
| | | {field: 'tabId', width: '150',title: 'BOMId', sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'id', width: '150',title: t('ingredients.materialCode'), sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'consume',title: '消耗量',showOverflow:'ellipsis' }, |
| | | {field: 'price',title: '使用价格',showOverflow:'ellipsis' } |
| | | {field: 'consume',title: t('bom.consume'),showOverflow:'ellipsis' }, |
| | | {field: 'price',title: t('bom.price'),showOverflow:'ellipsis' } |
| | | ] |
| | | const bomTitle = [ |
| | | |
| | |
| | | materialStore.value[i].tabId= res.data.data[i].tabId |
| | | switch (res.data.data[i].bomType) { |
| | | case '1': |
| | | materialStore.value[i].bomType = '面积'; |
| | | materialStore.value[i].bomType = t('order.area'); |
| | | break; |
| | | case '2': |
| | | materialStore.value[i].bomType = '周长'; |
| | | materialStore.value[i].bomType = t('order.perimeter'); |
| | | break; |
| | | case "3": |
| | | materialStore.value[i].bomType = '数量'; |
| | | materialStore.value[i].bomType = t('order.quantity'); |
| | | break; |
| | | default: |
| | | materialStore.value[i].bomType = res.data.data[i].bomType; // 保留原值 |
| | |
| | | //拆分每个产品 |
| | | const productList = computed(() => { |
| | | const raw = (props.productName ?? '').toString().trim() |
| | | if (!raw) return ['其它'] |
| | | if (!raw) return [t('bom.other')] |
| | | |
| | | const parts = raw |
| | | .split(/[+*]/) |
| | | .map(s => s.trim()) |
| | | .filter(Boolean) |
| | | |
| | | parts.push('其它') |
| | | parts.push(t('bom.other')) |
| | | |
| | | return parts |
| | | }) |
| | |
| | | if (type !== 'add') return |
| | | const key = activeProductIndex.value |
| | | if (key=="" && key==null) { |
| | | ElMessage.warning('请先选择一个产品标签') |
| | | ElMessage.warning(t('bom.msg.msg1')) |
| | | return |
| | | } |
| | | const plainRow = JSON.parse(JSON.stringify(row)) |