Merge remote-tracking branch 'origin/master'

master
夜笙歌 5 months ago
commit b749b5c166

@ -132,6 +132,11 @@ export interface BaseStationInfoForm extends BaseEntity {
*/ */
remark?: string; remark?: string;
/**
* Id
*/
machineId?: string | number;
productionTimeDays?: number; productionTimeDays?: number;
productionTimeHours?: number; productionTimeHours?: number;
productionTimeMinutes?: number; productionTimeMinutes?: number;

@ -70,8 +70,21 @@ export const delMaterialBom = (materialBomId: string | number | Array<string | n
*/ */
export function getMaterialBomList(query) { export function getMaterialBomList(query) {
return request({ return request({
url: '/mes/materialBom/getMaterialBomList', url: '/mes/materialBom/getProdMaterialBomList',
method: 'get', method: 'get',
params: query params: query
}); });
}; };
/**
* BOM
* @param data
*/
export const addBatchMaterialBom = (data) => {
return request({
url: '/mes/materialBom/addBatchMaterialBom',
method: 'post',
data: data
});
};

@ -191,6 +191,7 @@ export interface MaterialBomForm extends BaseEntity {
*/ */
remark?: string; remark?: string;
materialBomList?: any[];//批量新增
} }
export interface MaterialBomQuery { export interface MaterialBomQuery {

@ -81,7 +81,9 @@ export interface TechnologyInfoForm extends BaseEntity {
* *
*/ */
standardTime?: number; standardTime?: number;
productionTimeDays?: number;
productionTimeHours?: number;
productionTimeMinutes?: number;
/** /**
* 1 0 * 1 0
*/ */
@ -92,6 +94,7 @@ export interface TechnologyInfoForm extends BaseEntity {
*/ */
remark?: string; remark?: string;
prodTechnologyStepInfoList?: [];
} }
export interface TechnologyInfoQuery extends PageQuery { export interface TechnologyInfoQuery extends PageQuery {

@ -23,6 +23,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label='机台名称' prop='machineId'>
<el-select v-model="queryParams.machineId" placeholder="请选择机台名称" clearable @keyup.enter='handleQuery' >
<el-option
v-for="item in machineInfoList"
:key="item.machineId"
:label="item.machineName"
:value="item.machineId"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type='primary' icon='Search' @click='handleQuery'>搜索</el-button> <el-button type='primary' icon='Search' @click='handleQuery'>搜索</el-button>
<el-button icon='Refresh' @click='resetQuery'>重置</el-button> <el-button icon='Refresh' @click='resetQuery'>重置</el-button>
@ -78,6 +88,7 @@
</el-table-column> </el-table-column>
<el-table-column label='AGV编号' align='center' prop='agvCode' v-if='columns[7].visible' /> <el-table-column label='AGV编号' align='center' prop='agvCode' v-if='columns[7].visible' />
<el-table-column label='IP地址' align='center' prop='ipAddress' v-if='columns[8].visible' /> <el-table-column label='IP地址' align='center' prop='ipAddress' v-if='columns[8].visible' />
<el-table-column label='机台名称' align='center' prop='machineName' v-if='columns[16].visible' />
<el-table-column label='激活标识' align='center' prop='activeFlag' v-if='columns[9].visible'> <el-table-column label='激活标识' align='center' prop='activeFlag' v-if='columns[9].visible'>
<template #default='scope'> <template #default='scope'>
<dict-tag :options='active_flag' :value='scope.row.activeFlag' /> <dict-tag :options='active_flag' :value='scope.row.activeFlag' />
@ -143,6 +154,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label='机台名称' prop='machineId'>
<el-select v-model="form.machineId" placeholder="请选择机台名称">
<el-option
v-for="item in machineInfoList"
:key="item.machineId"
:label="item.machineName"
:value="item.machineId"
/>
</el-select>
</el-form-item>
<el-form-item label='单位生产时间' prop='productionTime'> <el-form-item label='单位生产时间' prop='productionTime'>
<el-input-number v-model="form.productionTimeDays" placeholder="请输入天数" :min="0" :max="10000" <el-input-number v-model="form.productionTimeDays" placeholder="请输入天数" :min="0" :max="10000"
:controls="false" :style="{ width: '50px' }"/> :controls="false" :style="{ width: '50px' }"/>
@ -194,6 +215,7 @@ import {
} from '@/api/mes/baseStationInfo'; } from '@/api/mes/baseStationInfo';
import { BaseStationInfoVO, BaseStationInfoQuery, BaseStationInfoForm } from '@/api/mes/baseStationInfo/types'; import { BaseStationInfoVO, BaseStationInfoQuery, BaseStationInfoForm } from '@/api/mes/baseStationInfo/types';
import { getProcessInfoList } from '@/api/mes/baseProcessInfo'; import { getProcessInfoList } from '@/api/mes/baseProcessInfo';
import { getProdBaseMachineInfoList } from '@/api/mes/prodBaseMachineInfo';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { station_type, active_flag } = toRefs<any>(proxy?.useDict('station_type', 'active_flag')); const { station_type, active_flag } = toRefs<any>(proxy?.useDict('station_type', 'active_flag'));
@ -210,6 +232,7 @@ const total = ref(0);
const queryFormRef = ref<ElFormInstance>(); const queryFormRef = ref<ElFormInstance>();
const baseStationInfoFormRef = ref<ElFormInstance>(); const baseStationInfoFormRef = ref<ElFormInstance>();
let processInfoList = ref([]); let processInfoList = ref([]);
let machineInfoList = ref([]);
const dialog = reactive<DialogOption>({ const dialog = reactive<DialogOption>({
visible: false, visible: false,
@ -222,6 +245,12 @@ const getProcessInfoListSelect = async () => {
processInfoList.value = res.data; processInfoList.value = res.data;
}; };
/** 查询机台下拉树结构 */
const getProdBaseMachineInfoListSelect = async () => {
let res = await getProdBaseMachineInfoList(null);
machineInfoList.value = res.data;
};
// //
const columns = ref<FieldOption[]>([ const columns = ref<FieldOption[]>([
{ key: 0, label: `主键标识`, visible: false }, { key: 0, label: `主键标识`, visible: false },
@ -239,7 +268,8 @@ const columns = ref<FieldOption[]>([
{ key: 12, label: `创建人`, visible: false }, { key: 12, label: `创建人`, visible: false },
{ key: 13, label: `创建时间`, visible: false }, { key: 13, label: `创建时间`, visible: false },
{ key: 14, label: `更新人`, visible: false }, { key: 14, label: `更新人`, visible: false },
{ key: 15, label: `更新时间`, visible: false } { key: 15, label: `更新时间`, visible: false },
{ key: 16, label: `机台名称`, visible: true }
]); ]);
const initFormData: BaseStationInfoForm = { const initFormData: BaseStationInfoForm = {
@ -251,6 +281,7 @@ const initFormData: BaseStationInfoForm = {
productionTime: undefined, productionTime: undefined,
agvCode: undefined, agvCode: undefined,
ipAddress: undefined, ipAddress: undefined,
machineId: undefined,
activeFlag: '1', activeFlag: '1',
remark: undefined, remark: undefined,
productionTimeDays: 0, productionTimeDays: 0,
@ -408,6 +439,7 @@ const handleExport = () => {
onMounted(() => { onMounted(() => {
getProcessInfoListSelect(); getProcessInfoListSelect();
getProdBaseMachineInfoListSelect();
getList(); getList();
}); });
</script> </script>

@ -36,6 +36,13 @@
<el-button type='primary' plain icon='Plus' @click='handleAdd()' v-hasPermi="['mes:materialBom:add']"> <el-button type='primary' plain icon='Plus' @click='handleAdd()' v-hasPermi="['mes:materialBom:add']">
</el-button> </el-button>
</el-col> </el-col>
<el-col :span='1.5'>
<el-button type='primary' plain icon='Plus' @click='handleAddMaterialBom()' v-hasPermi="['mes:materialBom:add']">
新增BOM
</el-button>
</el-col>
<el-col :span='1.5'> <el-col :span='1.5'>
<el-button type='info' plain icon='Sort' @click='handleToggleExpandAll'>展开/折叠</el-button> <el-button type='info' plain icon='Sort' @click='handleToggleExpandAll'>展开/折叠</el-button>
</el-col> </el-col>
@ -53,7 +60,7 @@
<!-- <el-table-column label='主键标识' align='center' prop='materialBomId' />--> <!-- <el-table-column label='主键标识' align='center' prop='materialBomId' />-->
<!-- <el-table-column label='父级标识' align='center' prop='parentId' />--> <!-- <el-table-column label='父级标识' align='center' prop='parentId' />-->
<!-- <el-table-column label='物料ID' align='center' prop='materialId' />--> <!-- <el-table-column label='物料ID' align='center' prop='materialId' />-->
<el-table-column label='物料名称' align='left' prop='materialName' width='300'/> <el-table-column label='物料名称' align='left' prop='materialName' width='500'/>
<el-table-column label='bom说明' align='center' prop='materialBomDesc' /> <el-table-column label='bom说明' align='center' prop='materialBomDesc' />
<el-table-column label='bom版本' align='center' prop='materialBomVersion' /> <el-table-column label='bom版本' align='center' prop='materialBomVersion' />
<!-- <el-table-column label='祖级列表' align='center' prop='ancestors' />--> <!-- <el-table-column label='祖级列表' align='center' prop='ancestors' />-->
@ -208,6 +215,94 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 根据结构BOM添加物料BOM信息对话框 -->
<el-dialog :title="materialBomDialog.title" v-model="materialBomDialog.visible" width="1600px" append-to-body>
<el-table
ref="materialBomTableRef"
:data="materialBomList"
row-key="materialBomId"
border
:tree-props="{
children: 'children',
hasChildren: 'hasChildren'
}"
:default-expand-all="true"
>
<el-table-column label="序号" type="index" width="50" align="center" />
<el-table-column label="结构BOM名称" prop="materialTypeName" min-width="120" />
<el-table-column label="物料" prop="materialName" min-width="180">
<template #default="scope">
<el-input
v-model="scope.row.materialName"
placeholder="点击选择物料"
readonly
@click="handleMaterialSelect(scope.row)">
<template #append>
<el-button icon="Search" />
</template>
</el-input>
</template>
</el-table-column>
<el-table-column label="BOM说明" prop="materialBomDesc" min-width="120">
<template #default="scope">
<el-input v-model="scope.row.materialBomDesc" placeholder="请输入BOM说明" />
</template>
</el-table-column>
<el-table-column label="BOM版本" prop="materialBomVersion" min-width="120">
<template #default="scope">
<el-input v-model="scope.row.materialBomVersion" placeholder="请输入BOM版本" />
</template>
</el-table-column>
<el-table-column label="标准数量" prop="standardAmount" width="160">
<template #default="scope">
<el-input-number
v-model="scope.row.standardAmount"
:min="1"
:precision="2"
:step="1"
:controls="true"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="校验类型" prop="checkType" width="120">
<template #default="scope">
<el-select v-model="scope.row.checkType" placeholder="请选择">
<el-option
v-for="dict in mes_check_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="激活标识" prop="activeFlag" width="120">
<template #default="scope">
<el-select v-model="scope.row.activeFlag" placeholder="请选择">
<el-option
v-for="dict in active_flag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" min-width="120">
<template #default="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注" />
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitMaterialBom"> </el-button>
<el-button @click="cancelMaterialBom"> </el-button>
</div>
</template>
</el-dialog>
</div> </div>
</template> </template>
@ -217,10 +312,12 @@ import {
getMaterialBom, getMaterialBom,
delMaterialBom, delMaterialBom,
addMaterialBom, addMaterialBom,
updateMaterialBom updateMaterialBom, addBatchMaterialBom
} from '@/api/mes/materialBom'; } from '@/api/mes/materialBom';
import { MaterialBomVO, MaterialBomQuery, MaterialBomForm } from '@/api/mes/materialBom/types'; import { MaterialBomVO, MaterialBomQuery, MaterialBomForm } from '@/api/mes/materialBom/types';
import MaterialSelect from '@/views/mes/baseMaterialInfo/addMaterial.vue'; import MaterialSelect from '@/views/mes/baseMaterialInfo/addMaterial.vue';
import { BaseStructureBomVO } from '@/api/mes/baseStructureBom/types';
import { getBaseStructureBomList } from '@/api/mes/baseStructureBom';
type MaterialBomOption = { type MaterialBomOption = {
materialBomId: number; materialBomId: number;
@ -233,7 +330,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { mes_check_type, material_classfication, active_flag } = toRefs<any>(proxy?.useDict('mes_check_type', 'material_classfication', 'active_flag')); const { mes_check_type, material_classfication, active_flag } = toRefs<any>(proxy?.useDict('mes_check_type', 'material_classfication', 'active_flag'));
const materialBomList = ref([]); const materialBomList = ref<any[]>([]);
const materialBomOptions = ref<MaterialBomOption[]>([]); const materialBomOptions = ref<MaterialBomOption[]>([]);
const buttonLoading = ref(false); const buttonLoading = ref(false);
const showSearch = ref(true); const showSearch = ref(true);
@ -420,15 +517,253 @@ const handleDelete = async (row: MaterialBomVO) => {
/** 新增按钮操作 */ /** 新增按钮操作 */
const handleMaterialAdd = () => { const handleMaterialAdd = () => {
materialOpen.value = true; materialOpen.value = true;
} };
//
/** 提交物料BOM信息按钮 */
const submitMaterialForm = () => { const submitMaterialForm = () => {
let selectedRow = materialSelectRef.value.tableRef.store.states.currentRow.value; const selectedRow = materialSelectRef.value.tableRef.store.states.currentRow.value;
form.value.materialId = selectedRow.materialId if (materialOpen.value) {
form.value.materialName = selectedRow.materialName if (currentRow.value && selectedRow) {
currentRow.value.materialId = selectedRow.materialId;
currentRow.value.materialName = selectedRow.materialName;
materialOpen.value = false; materialOpen.value = false;
} }
} else {
form.value.materialId = selectedRow.materialId;
form.value.materialName = selectedRow.materialName;
materialOpen.value = false;
}
};
/** 当前选中的行 */
const currentRow = ref<any>(null);
//
const handleMaterialSelect = (row: any) => {
currentRow.value = row;
materialOpen.value = true;
};
//
const handleSelection = (selection: any) => {
if (currentRow.value) {
currentRow.value.materialId = selection.materialId;
currentRow.value.materialName = selection.materialName;
}
};
//BOMBOM
const materialBomDialog = reactive({
visible: false,
title: ''
});
// const materialBomForm = ref({});
// const currentStructureBom = ref<BaseStructureBomVO>({} as BaseStructureBomVO);
const materialOptions = ref<any>({});
// BOM
const handleAddMaterialBom = async () => {
materialBomDialog.visible = true;
materialBomDialog.title = "新增BOM";
// BOM
materialBomList.value = [];
// BOMBOM
await generateMaterialBomList();
};
// BOM
const generateMaterialBomList = async () => {
try {
// BOM
const res = await getBaseStructureBomList(null);
// BOM
const processBomTree = (items: any[]): MaterialBomForm[] => {
return items.map(item => ({
materialBomId: -Math.abs(item.structureBomId), // 使ID
parentId: item.parentId === 0 ? 0 : -Math.abs(item.parentId), //
materialTypeId: item.materialTypeId,
materialTypeName: item.materialTypeName,
materialId: undefined,
materialName: undefined,
materialBomDesc: '',
materialBomVersion: '',
standardAmount: undefined,
checkType: undefined,
activeFlag: undefined,
remark: '',
children: item.children && item.children.length > 0
? processBomTree(item.children)
: []
}));
};
//
const structureBomData = buildTree(res.data);
//
materialBomList.value = processBomTree(structureBomData);
} catch (error) {
console.error('获取结构BOM数据失败:', error);
proxy?.$modal.msgError('获取数据失败');
}
};
//
const buildTree = (data: any[]) => {
const tree: any[] = [];
const map = new Map();
// id
data.forEach(item => {
//
const node = { ...item, children: [] };
map.set(item.structureBomId, node);
});
//
data.forEach(item => {
const node = map.get(item.structureBomId);
if (item.parentId === 0) {
//
tree.push(node);
} else {
// children
const parent = map.get(item.parentId);
if (parent) {
if (!parent.children) {
parent.children = [];
}
parent.children.push(node);
}
}
});
return tree;
};
//
const handleMaterialChange = (materialId: string | number, row: any) => {
const material = materialOptions.value[row.materialTypeId]?.find(
(item: any) => item.materialId === materialId
);
if (material) {
row.materialName = material.materialName;
}
};
// BOM
const submitMaterialBom = async () => {
try {
//
const validateTreeData = (nodes: any[], path: string = ''): string | null => {
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
const currentPath = path ? `${path} -> ${node.materialTypeName}` : node.materialTypeName;
//
if (!node.materialId) {
//
if (hasSelectedDescendant(node)) {
return `请先为 "${currentPath}" 选择物料,不能跳过中间层级`;
}
}
//
if (node.children && node.children.length > 0) {
const childResult = validateTreeData(node.children, currentPath);
if (childResult) {
return childResult;
}
}
}
return null;
};
//
const hasSelectedDescendant = (node: any): boolean => {
if (!node.children) {
return false;
}
return node.children.some((child: any) => {
if (child.materialId) {
return true;
}
return hasSelectedDescendant(child);
});
};
//
const validationError = validateTreeData(materialBomList.value);
if (validationError) {
proxy?.$modal.msgError(validationError);
return;
}
//
const flattenTree = (nodes: any[], parentId: number = 0): any[] => {
let result: any[] = [];
nodes.forEach((node, index) => {
const { children, ...nodeWithoutChildren } = node;
//
if (nodeWithoutChildren.materialId) {
//
if (!nodeWithoutChildren.standardAmount) {
throw new Error(`物料 "${nodeWithoutChildren.materialName}" 的标准数量不能为空`);
}
if (nodeWithoutChildren.standardAmount <= 0) {
throw new Error(`物料 "${nodeWithoutChildren.materialName}" 的标准数量必须大于0`);
}
if (!nodeWithoutChildren.checkType) {
throw new Error(`物料 "${nodeWithoutChildren.materialName}" 的校验类型不能为空`);
}
if (!nodeWithoutChildren.activeFlag) {
throw new Error(`物料 "${nodeWithoutChildren.materialName}" 的激活标识不能为空`);
}
const newNode = {
...nodeWithoutChildren,
parentId: parentId
};
result.push(newNode);
//
if (children && children.length > 0) {
result = result.concat(flattenTree(children, newNode.materialBomId));
}
}
});
return result;
};
const flattenedData = flattenTree(materialBomList.value);
if (flattenedData.length === 0) {
proxy?.$modal.msgError('请至少输入一行有效数据');
return;
}
//
await addBatchMaterialBom(flattenedData);
proxy?.$modal.msgSuccess('新增成功');
materialBomDialog.visible = false;
getList(); //
} catch (error: any) {
console.error('提交失败:', error);
proxy?.$modal.msgError(error.message || '提交失败');
}
};
//
const cancelMaterialBom = () => {
materialBomDialog.visible = false;
//
getList();
};
//
const selection = ref([]);
onMounted(() => { onMounted(() => {
getList(); getList();

@ -191,35 +191,6 @@
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="100"> <el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="100">
<template #default="scope"> <template #default="scope">
<el-button
icon="el-icon-search"
size="small"
type="primary"
@click="handleDrawing(scope.row)"
v-if=" scope.row.userId != null"
>图纸
</el-button>
<el-button
icon="el-icon-search"
size="small"
type="success"
@click="handleSop(scope.row)"
v-if=" scope.row.userId != null"
>SOP
</el-button>
<el-button
icon="el-icon-lock"
size="small"
type="primary"
@click="handleApplyRawOutstock(scope.row)"
v-if="scope.row.processType === PROCESS_TYPE.AUTO && scope.row.planId!=null && scope.row.planId!==''
&& scope.row.planStatus !== PLAN_STATUS.FINISHED
&& form.orderStatus!==ORDER_STATUS.FINISHED && form.orderStatus!==ORDER_STATUS.RECALLED && form.orderStatus!==ORDER_STATUS.DELETED"
>投料
</el-button>
<el-button <el-button
icon="el-icon-delete" icon="el-icon-delete"
size="small" size="small"
@ -229,7 +200,6 @@
:disabled="(scope.row.planStatus !== PLAN_STATUS.TO_DISPATCH && scope.row.planStatus !== PLAN_STATUS.DISPATCHED) || form.orderStatus===ORDER_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.RECALLED || form.orderStatus===ORDER_STATUS.DELETED" :disabled="(scope.row.planStatus !== PLAN_STATUS.TO_DISPATCH && scope.row.planStatus !== PLAN_STATUS.DISPATCHED) || form.orderStatus===ORDER_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.RECALLED || form.orderStatus===ORDER_STATUS.DELETED"
>删除 >删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -246,231 +216,26 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<el-dialog
:visible.sync="blueprintModel"
title="上传图纸"
width="30%"
@before-close="blueprintModel = false">
<el-form ref="form">
<el-form-item label="选择BOM图纸">
<el-select v-model="materialBomAttachIdList" placeholder="请选择选择BOM图纸" multiple filterable :clearable="false"
:disabled="(addProductPlanObject.planStatus !== PLAN_STATUS.DISPATCHED)">
<el-option
v-for="item in attachInfoList"
:key="item.attachId"
:label="item.attachName"
:value="item.attachId"
:disabled="isOptionDisabled(item.attachId)"
></el-option>
</el-select>
</el-form-item>
</el-form>
<el-upload
single
ref="drawingUpload"
list-type="picture-card"
action="uploadDrawingUrl"
:auto-upload="true"
:limit="drawingLimit"
:headers="headers"
:before-upload="handleBeforeUpload"
:http-request="httpRequest"
:on-exceed="handleExceed"
:file-list="fileList"
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img
v-if="isAssetTypeAnImage(file.name)"
:alt="file.name"
:src="file.url" class="el-upload-list__item-thumbnail"
>
<span v-else>{{ file.name }}</span>
<span class="el-upload-list__item-actions">
<span
v-if="isAssetTypeAnImage(file.name)"
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span>
<span
class="el-upload-list__item-delete"
@click="handleRemoveDrawing(file)"
v-if="addProductPlanObject.planStatus === PLAN_STATUS.DISPATCHED"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<!-- 上传提示 -->
<el-button type="primary" @click="drawingFileUploadSubmit"> </el-button>
<el-button @click="blueprintModel = false"> </el-button>
</span>
</el-dialog>
<el-dialog
:visible.sync="sopViewModel"
title="上传SOP附件"
width="30%"
@before-close="sopViewModel = false">
<el-form ref="form">
<el-form-item label="选择BOM的SOP">
<el-select v-model="materialBomAttachIdList" placeholder="请选择选择BOM的SOP" multiple filterable :clearable="false"
:disabled="(addProductPlanObject.planStatus !== PLAN_STATUS.DISPATCHED)">
<el-option
v-for="item in attachInfoList"
:key="item.attachId"
:label="item.attachName"
:value="item.attachId"
:disabled="isOptionDisabled(item.attachId)"
></el-option>
</el-select>
</el-form-item>
</el-form>
<el-upload
single
ref="drawingUpload"
list-type="picture-card"
action="uploadImgUrl"
:auto-upload="true"
:limit="sopLimit"
:headers="headers"
:before-upload="handleBeforeUpload"
:http-request="httpSopRequest"
:on-exceed="handleExceed"
:file-list="fileList"
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img
v-if="isAssetTypeAnImage(file.name)"
:alt="file.name"
:src="file.url" class="el-upload-list__item-thumbnail"
>
<span v-else>{{ file.name }}</span>
<span class="el-upload-list__item-actions">
<span
v-if="isAssetTypeAnImage(file.name)"
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span>
<span
class="el-upload-list__item-delete"
@click="handleRemoveSop(file)"
v-if="addProductPlanObject.planStatus === PLAN_STATUS.DISPATCHED"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<!-- 上传提示 -->
<!-- <div class="el-upload__tip" slot="tip" v-if="isShowTip">-->
<!-- 请上传-->
<!-- <template v-if="sopFileSize"> <b style="color: #f56c6c">{{ sopFileSize }}MB</b></template>-->
<!-- <template v-if="sopFileType"> <b style="color: #f56c6c">{{ sopFileType.join("/") }}</b></template>-->
<!-- 的文件-->
<!-- </div>-->
<el-button type="primary" @click="sopFileUploadSubmit"> </el-button>
<el-button @click="sopViewModel = false"> </el-button>
</span>
</el-dialog>
<el-dialog
:visible.sync="pictureDetailModel"
title="图纸预览"
width="800"
append-to-body
>
<img
:src="dialogImageUrl"
style="display: block; max-width: 100%; margin: 0 auto"
/>
</el-dialog>
<!-- 投料信息对话框 -->
<el-dialog title="投料" :visible.sync="applyRawOutstockOpen" append-to-body>
<apply-raw-outstock ref="applyRawOutstockRef" :defineData="productPlanData"
v-if="applyRawOutstockOpen"></apply-raw-outstock>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import {getProductOrder} from "@//api/mes/productOrder";
// import {
// deleteProductPlansByDispatchCode,
// getDispatchCode,
// selectProductPlans,
// checkAddMesProductPlanList,
// orderAddMesProductPlanList,
// getBaseRouteProcesses,
// getProcessUsers,
// uploadFile, getAttachInfoList
// } from "@//api/mes/productplan";
// import {getConfigKey} from "@//api/system/config"
// import {deepClone} from "@//utils/index";
// import {getToken} from "@//utils/auth";
// import {getBomAttachInfo, listMaterialBom} from "@/api/mes/materialBom";
// import {listMaterialinfo} from "@/api/mes/materialinfo";
import { getOrderInfo } from "@/api/mes/orderInfo"; import { getOrderInfo } from "@/api/mes/orderInfo";
import { getBaseRouteProcesses, getDispatchCode,} from '@/api/mes/planInfo'; import { getBaseRouteProcesses, getDispatchCode, selectProductPlans } from '@/api/mes/planInfo';
import { getProdBaseProcessUserList } from '@/api/mes/prodBaseProcessUser'; import { getProdBaseProcessUserList } from '@/api/mes/prodBaseProcessUser';
import { getPlanInfo, getPlanInfoList, updatePlanInfo, addPlanInfo, delPlanInfo, listPlanInfo,selectProductPlans } from '@/api/mes/planInfo'
import { getStationInfoList } from '@/api/mes/baseStationInfo'; import { getStationInfoList } from '@/api/mes/baseStationInfo';
import { getProdLineList } from '@/api/mes/baseProdLineInfo'; import { getProdLineList } from '@/api/mes/baseProdLineInfo';
import { getBaseRouteList } from '@/api/mes/baseRoute'; import { getBaseRouteList } from '@/api/mes/baseRoute';
import { getProcessInfoList } from '@/api/mes/baseProcessInfo'; import { getProcessInfoList } from '@/api/mes/baseProcessInfo';
let id = 0 let id = 0
let deepSearch = (arr, target) => {
let results = []
arr.forEach(element => {
console.log(element)
id = Math.max(id, element.id)
if (element.id === target) {
results.push(element)
} else if (Array.isArray(element.children)) {
results = results.concat(deepSearch(element.children, target))
}
// if (Array.isArray(element.children)) {
// results = results.concat(deepSearch(element.children, target))
// } else if (element.id === target) {
// results.push(element)
// }
})
return results
}
export default { export default {
name: "productPlanEdit", name: "productPlanEdit",
dicts: ['plan_status', 'product_status', 'mes_dispatch_flag'], dicts: ['plan_status', 'product_status', 'mes_dispatch_flag'],
provide() {
return {
closeRawOutstockDialog: this.closeRawOutstockDialog,
}
},
props: { props: {
value: [String, Object, Array, Number], value: [String, Object, Array, Number],
// sop // sop
@ -478,12 +243,6 @@ export default {
type: Number, type: Number,
default: 20, default: 20,
}, },
//
drawingLimit: {
type: Number,
default: 20,
},
// //
isShowTip: { isShowTip: {
type: Boolean, type: Boolean,
@ -500,9 +259,6 @@ export default {
// //
single: true, single: true,
checkedMesProductPlanList: [], checkedMesProductPlanList: [],
//
uploadImgUrl: import.meta.env.VUE_APP_BASE_API,
uploadDrawingUrl: import.meta.env.VUE_APP_BASE_API + "/file/upload2SharePath",
// name // name
activeName: "columnInfo", activeName: "columnInfo",
// //
@ -515,8 +271,6 @@ export default {
mesProductPlanList: [], mesProductPlanList: [],
//ID //ID
toDeletedPlanIds: [], toDeletedPlanIds: [],
applyRawOutstockOpen: false,
productPlanData: {}, productPlanData: {},
// //
info: {}, info: {},
@ -629,13 +383,6 @@ export default {
materialBomAttachIdList: [], materialBomAttachIdList: [],
}; };
}, },
watch: {
'materialBomAttachIdList': {
handler(newVal, oldVal) {
this.updateAttachInfoByBom(newVal, oldVal);
},
}
},
created() { created() {
this.fetchOrderInfo(); this.fetchOrderInfo();
}, },
@ -653,53 +400,7 @@ export default {
} }
} }
}, },
getConfigValues(){
//
getConfigKey("mes.drawing.allowedExtension").then(res => {
if(res.msg){
this.drawingFileType = res.msg.split(",");
}
});
getConfigKey("mes.drawing.maxSize").then(res => {
if(res.msg){
this.drawingFileSize = res.msg;
}
});
getConfigKey("mes.sop.allowedExtension").then(res => {
if(res.msg){
this.sopFileType = res.msg.split(",");
}
});
getConfigKey("mes.sop.maxSize").then(res => {
if (res.msg) {
this.sopFileSize = res.msg;
}
});
},
/* getProcessUsers(productOrderId) {
getProdBaseProcessUserList(this.form.dispatchId).then(res => {
res.data.forEach(processUser => {
if (!this.processUsers[processUser.processId]) {
this.processUsers[processUser.processId] = [];
}
this.processUsers[processUser.processId].push(processUser);
});
selectProductPlans({productOrderId: productOrderId}).then(res => {
this.groupProductPlans(res.data)
// res.data.forEach(e => {
// // false=true=
// e.oldRowFlag = true;
// this.mesProductPlanList.push(e);
// })
})
});
},*/
async getProcessJoin(productOrderId) { async getProcessJoin(productOrderId) {
const routeId = this.form.dispatchId; const routeId = this.form.dispatchId;
const processId = this.form.processId; const processId = this.form.processId;
@ -834,58 +535,6 @@ export default {
}) })
}, },
addProcessUser(scope) {
let finishStatus = this.PLAN_STATUS.FINISHED
const filterPlanList = this.mesProductPlanList.filter(function (item) {
return scope.row.dispatchCode + "-" + scope.row.processId === item.dispatchCode + "-" + item.processId
&& item.planStatus !== finishStatus;
})
if (filterPlanList.length <= 0) {
this.$modal.msgError("此工序已经完成,不能添加");
return;
}
let data = deepSearch(this.mesProductPlanList, scope.row.id)?.[0]
let id = this.id + 1
this.id += 1;
if (Array.isArray(data.children)) {
this.$set(data.children, data.children.length, {
id: id,
dispatchCode: scope.row.dispatchCode,
processId: scope.row.processId,
productionTime: scope.row.productionTime,
materialBomId: scope.row.materialBomId,
planStatus: this.PLAN_STATUS.DISPATCHED,
userId: null
})
} else {
this.$set(data, 'children', [
{
id: id,
dispatchCode: scope.row.dispatchCode,
processId: scope.row.processId,
productionTime: scope.row.productionTime,
materialBomId: scope.row.materialBomId,
planStatus: this.PLAN_STATUS.DISPATCHED,
userId: null,
}
])
}
this.id += 1
// this.show = false
// this.show = true
},
isAssetTypeAnImage(ext) {
let suffix = ext.lastIndexOf(".");
let name = ext.substr(suffix + 1);
return ['png', 'jpg', 'jpeg'].includes(name.toLowerCase())
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
// let dataList = this.mesProductPlanList.filter(plan => !plan.oldRowFlag); // let dataList = this.mesProductPlanList.filter(plan => !plan.oldRowFlag);
@ -1092,22 +741,24 @@ export default {
}).catch(() => { }).catch(() => {
}); });
}, },
/** 生产计划明细序号 */ /** 生产计划明细序号 */
rowMesProductPlanIndex({row, rowIndex}) { rowMesProductPlanIndex({row, rowIndex}) {
row.index = rowIndex + 1; row.index = rowIndex + 1;
}, },
/** 复选框选中数据 */ /** 复选框选中数据 */
handleMesProductPlanSelectionChange(selection) { handleMesProductPlanSelectionChange(selection) {
this.checkedMesProductPlanList = selection this.checkedMesProductPlanList = selection
this.single = selection.length !== 1 this.single = selection.length !== 1
}, },
/** 关闭按钮 */ /** 关闭按钮 */
close() { close() {
const obj = {path: "/mes/plan/productOrder", query: {t: Date.now(), queryParams: this.$route.query.queryParams}}; const obj = {path: "/mes/prod/orderInfo", query: {t: Date.now(), queryParams: this.queryParams}};
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj);
}, },
/** 生产计划添加按钮操作 */ /** 生产计划添加按钮操作 */
async handleAddMesProductPlan() { async handleAddMesProductPlan() {
let dispatchCode = ""; let dispatchCode = "";
@ -1198,314 +849,6 @@ export default {
// 使 // 使
return /^[0-9]\d*$/.test(value); return /^[0-9]\d*$/.test(value);
}, },
//
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.pictureDetailModel = true;
},
//
handleDownload(file) {
window.open(file.url);
},
/** 查看图纸 */
handleDrawing(row) {
this.fileList = [];
if (row.planId != null && (!this.previewDrawingFlag[row.dispatchCode + "-" + row.processId + "-" + row.userId]
|| this.previewDrawingFlag[row.dispatchCode + "-" + row.processId + "-" + row.userId] !== "1")) {
this.previewDrawingFlag[row.dispatchCode + "-" + row.processId + "-" + row.userId] = "1";
getAttachInfoList(this.ATTACH_TYPE.DRAWING, row.dispatchCode, row.processId, row.userId).then(res => {
let attachList = res.data;
attachList.forEach(e => {
let previewFile = {};
previewFile.url = e.attachPath;
previewFile.name = e.attachName;
this.fileList.push(previewFile);
let groupAttachFile = {};
groupAttachFile.dispatchCode = row.dispatchCode;
groupAttachFile.processId = row.processId;
groupAttachFile.attachId = e.attachId;
groupAttachFile.attachPath = e.attachPath;
groupAttachFile.attachName = e.attachName;
let groupAttachFileList = this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = groupAttachFileList ? this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(groupAttachFile);
let uploadAttachList = this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = uploadAttachList ? this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(e.attachId);
})
})
} else {
if (this.groupAttachFileList[row.dispatchCode + "-" + row.processId + "-" + row.userId]) {
this.groupAttachFileList[row.dispatchCode + "-" + row.processId + "-" + row.userId].forEach(e => {
let previewFile = {};
previewFile.url = e.attachPath;
previewFile.name = e.attachName;
this.fileList.push(previewFile);
})
}
}
this.addProductPlanObject = row;
this.materialBomAttachIdList = [];
getBomAttachInfo(this.ATTACH_TYPE.DRAWING, this.addProductPlanObject.materialBomId).then(response => {
this.attachInfoList = response.data;
for (let e of this.fileList) {
let attachInfo = this.attachInfoList.find(item => item.attachPath === e.url);
if (attachInfo != null){
this.materialBomAttachIdList.push(attachInfo.attachId);
}
}
this.blueprintModel = true;
});
},
//
drawingFileUploadSubmit() {
for (let i = 0; i < this.mesProductPlanList.length; i++) {
let mesProductPlan = this.mesProductPlanList[i];
for (let child of mesProductPlan.children) {
if (mesProductPlan.dispatchCode === this.addProductPlanObject.dispatchCode
&& mesProductPlan.processId === this.addProductPlanObject.processId
&& child.userId === this.addProductPlanObject.userId) {
child.attachId = this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].join(",");
}
}
}
// this.uploadAttachList = [];
this.addProductPlanObject = {};
this.blueprintModel = false;
},
//
httpRequest(file) {
//
const fileData = file.file;
const formData = new FormData();
formData.append("file", fileData);
formData.append("processId", this.addProductPlanObject.processId);
formData.append("attachType", this.ATTACH_TYPE.DRAWING);
uploadFile(formData).then(
(res) => {
let uploadAttachList = this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = uploadAttachList ? this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(res.attachId);
//
let groupAttachFile = {};
groupAttachFile.dispatchCode = this.addProductPlanObject.dispatchCode;
groupAttachFile.processId = this.addProductPlanObject.processId;
groupAttachFile.attachId = res.attachId;
groupAttachFile.attachPath = res.imgUrl;
groupAttachFile.attachName = res.fileName;
let groupAttachFileList = this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = groupAttachFileList ? this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(groupAttachFile);
this.$modal.closeLoading();
}, (err) => {
this.$refs.drawingUpload.clearFiles(); //
this.$modal.closeLoading();
}
);
},
//
handleRemoveDrawing(file) {
let arrPic = this.$refs.drawingUpload.uploadFiles;
let index = arrPic.indexOf(file);
this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].splice(index, 1);
// this.uploadAttachList.splice(index, 1);
this.fileList.splice(index, 1);
this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].splice(index, 1);
let num = 0;
arrPic.map((item) => {
if (item.uid === file.uid) {
arrPic.splice(num, 1);
}
num++;
});
let attachInfo = this.attachInfoList.find(item => item.attachPath === file.url);
if (attachInfo != null){
this.materialBomAttachIdList = this.materialBomAttachIdList.filter(item => item !== attachInfo.attachId);
}
},
/** 查看sop */
handleSop(row) {
this.fileList = [];
if (row.planId != null && (!this.previewSopFlag[row.dispatchCode + "-" + row.processId + "-" + row.userId]
|| this.previewSopFlag[row.dispatchCode + "-" + row.processId + "-" + row.userId] !== "1")) {
this.previewSopFlag[row.dispatchCode + "-" + row.processId + "-" + row.userId] = "1";
getAttachInfoList(this.ATTACH_TYPE.SOP, row.dispatchCode, row.processId, row.userId).then(res => {
let attachList = res.data;
attachList.forEach(e => {
let previewFile = {};
previewFile.url = e.attachPath;
previewFile.name = e.attachName;
this.fileList.push(previewFile);
let groupSopFile = {};
groupSopFile.dispatchCode = row.dispatchCode;
groupSopFile.processId = row.processId;
groupSopFile.attachId = e.attachId;
groupSopFile.attachPath = e.attachPath;
groupSopFile.attachName = e.attachName;
let groupSopFileList = this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = groupSopFileList ? this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(groupSopFile);
let uploadSopList = this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = uploadSopList ? this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(e.attachId);
})
})
} else {
if (this.groupSopFileList[row.dispatchCode + "-" + row.processId + "-" + row.userId]) {
this.groupSopFileList[row.dispatchCode + "-" + row.processId + "-" + row.userId].forEach(e => {
let previewFile = {};
previewFile.url = e.attachPath;
previewFile.name = e.attachName;
this.fileList.push(previewFile);
})
}
}
this.addProductPlanObject = row;
this.materialBomAttachIdList = [];
getBomAttachInfo(this.ATTACH_TYPE.SOP, this.addProductPlanObject.materialBomId).then(response => {
this.attachInfoList = response.data;
for (let e of this.fileList) {
let attachInfo = this.attachInfoList.find(item => item.attachPath === e.url);
if (attachInfo != null){
this.materialBomAttachIdList.push(attachInfo.attachId);
}
}
this.sopViewModel = true;
});
},
//sop
sopFileUploadSubmit() {
for (let i = 0; i < this.mesProductPlanList.length; i++) {
let mesProductPlan = this.mesProductPlanList[i];
for (let child of mesProductPlan.children) {
if (mesProductPlan.dispatchCode === this.addProductPlanObject.dispatchCode
&& mesProductPlan.processId === this.addProductPlanObject.processId
&& child.userId === this.addProductPlanObject.userId) {
child.sopId = this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].join(",");
}
}
}
// this.uploadAttachList = [];
this.addProductPlanObject = {};
this.sopViewModel = false;
},
//Sop
httpSopRequest(file) {
//
const fileData = file.file;
const formData = new FormData();
formData.append("file", fileData);
formData.append("processId", this.addProductPlanObject.processId);
formData.append("attachType", this.ATTACH_TYPE.SOP);
uploadFile(formData).then(
(res) => {
let uploadSopList = this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = uploadSopList ? this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(res.attachId);
//
let groupSopFile = {};
groupSopFile.dispatchCode = this.addProductPlanObject.dispatchCode;
groupSopFile.processId = this.addProductPlanObject.processId;
groupSopFile.attachId = res.attachId;
groupSopFile.attachPath = res.imgUrl;
groupSopFile.attachName = res.fileName;
let groupSopFileList = this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = groupSopFileList ? this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(groupSopFile);
this.$modal.closeLoading();
}, (err) => {
this.$refs.drawingUpload.clearFiles(); //
this.$modal.closeLoading();
}
);
},
//
handleRemoveSop(file) {
let arrPic = this.$refs.drawingUpload.uploadFiles;
let index = arrPic.indexOf(file);
this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].splice(index, 1);
this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].splice(index, 1);
this.fileList.splice(index, 1);
let num = 0;
arrPic.map((item) => {
if (item.uid === file.uid) {
arrPic.splice(num, 1);
}
num++;
});
let attachInfo = this.attachInfoList.find(item => item.attachPath === file.url);
if (attachInfo != null){
this.materialBomAttachIdList = this.materialBomAttachIdList.filter(item => item !== attachInfo.attachId);
}
},
// loading
handleBeforeUpload(file) {
let fileType, fileSize;
if (this.sopViewModel) {
fileType = this.sopFileType;
fileSize = this.sopFileSize;
} else if (this.blueprintModel) {
fileType = this.drawingFileType;
fileSize = this.drawingFileSize;
}
let isImg = false;
if (fileType.length) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
isImg = fileType.some(type => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
} else {
isImg = file.type.indexOf("image") > -1;
}
if (!isImg) {
this.$modal.msgError(`文件格式不正确, 请上传${fileType.join("/")}格式文件!`);
return false;
}
if (fileSize) {
const isLt = file.size / 1024 / 1024 < fileSize;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过 ${fileSize} MB!`);
return false;
}
}
this.$modal.loading("正在上传文件,请稍候...");
this.number++;
},
//
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} !`);
},
handleDeleteDispatchUser(row) { handleDeleteDispatchUser(row) {
this.mesProductPlanList.forEach(mesProductPlan => { this.mesProductPlanList.forEach(mesProductPlan => {
@ -1514,77 +857,8 @@ export default {
if (row.planId != null && row.planId !== '') { if (row.planId != null && row.planId !== '') {
this.toDeletedPlanIds.push(row.planId); this.toDeletedPlanIds.push(row.planId);
} }
}, },
handleApplyRawOutstock(row) {
if (row.processType === this.PROCESS_TYPE.AUTO) {
this.applyRawOutstockOpen = true;
this.productPlanData.planCode = row.planCode;
this.productPlanData.planId = row.planId;
this.productPlanData.dispatchAmount = row.dispatchAmount;
this.productPlanData.saleOrderId = this.form.saleOrderId;
this.productPlanData.materialBomId = this.form.materialBomId;
}
},
closeRawOutstockDialog() {
this.applyRawOutstockOpen = false;
},
//BOMSOP
updateAttachInfoByBom(newVal, oldVal) {
if (newVal.length === 0) {
return
}
let result = [];
let targetAttachIds = newVal.filter(item => !oldVal.includes(item));
for (let targetAttachId of targetAttachIds) {
result.push(this.attachInfoList.find(item => item.attachId === targetAttachId));
}
console.log("result:",result);
let isDrawing = this.blueprintModel;
//
if (isDrawing) {
for (let e of result) {
let previewFile = {};
previewFile.url = e.attachPath;
previewFile.name = e.attachName;
this.fileList.push(previewFile);
let groupAttachFile = {};
groupAttachFile.dispatchCode = this.addProductPlanObject.dispatchCode;
groupAttachFile.processId = this.addProductPlanObject.processId;
groupAttachFile.attachId = e.attachId;
groupAttachFile.attachPath = e.attachPath;
groupAttachFile.attachName = e.attachName;
let groupAttachFileList = this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = groupAttachFileList ? this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.groupAttachFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(groupAttachFile);
let uploadAttachList = this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = uploadAttachList ? this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.uploadAttachList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(e.attachId);
}
} else {
//SOP
for (let e of result) {
let previewFile = {};
previewFile.url = e.attachPath;
previewFile.name = e.attachName;
this.fileList.push(previewFile);
let groupSopFile = {};
groupSopFile.dispatchCode = this.addProductPlanObject.dispatchCode;
groupSopFile.processId = this.addProductPlanObject.processId;
groupSopFile.attachId = e.attachId;
groupSopFile.attachPath = e.attachPath;
groupSopFile.attachName = e.attachName;
let groupSopFileList = this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = groupSopFileList ? this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.groupSopFileList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(groupSopFile);
let uploadSopList = this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId];
this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] = uploadSopList ? this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId] : [];
this.uploadSopList[this.addProductPlanObject.dispatchCode + "-" + this.addProductPlanObject.processId + "-" + this.addProductPlanObject.userId].push(e.attachId);
}
}
},
isOptionDisabled(attachId) { isOptionDisabled(attachId) {
// //
@ -1622,7 +896,6 @@ export default {
} }
}, },
} }
; ;
onMounted(() => { onMounted(() => {

@ -7,12 +7,12 @@
<el-card shadow='hover'> <el-card shadow='hover'>
<el-form ref='queryFormRef' :model='queryParams' :inline='true'> <el-form ref='queryFormRef' :model='queryParams' :inline='true'>
<el-form-item label='工序ID' prop='processId'> <el-form-item label='工序ID' prop='processId'>
<el-select v-model="queryParams.processId" placeholder="请选择所属工序" clearable @keyup.enter='handleQuery' > <el-select v-model='queryParams.processId' placeholder='请选择所属工序' clearable @keyup.enter='handleQuery'>
<el-option <el-option
v-for="item in processInfoList" v-for='item in processInfoList'
:key="item.processId" :key='item.processId'
:label="item.processName" :label='item.processName'
:value="item.processId" :value='item.processId'
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -91,7 +91,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label='工艺版本' align='center' prop='technologyVersion' v-if='columns[6].visible' /> <el-table-column label='工艺版本' align='center' prop='technologyVersion' v-if='columns[6].visible' />
<el-table-column label='硫化标准时间' align='center' prop='standardTime' v-if='columns[7].visible' /> <el-table-column label='硫化标准时间' align='center' prop='standardTime' v-if='columns[7].visible'>
<template v-slot='scope'>
<span>{{ formatDayHourMinutes(scope.row.standardTime) }}</span>
</template>
</el-table-column>
<el-table-column label='激活标识' align='center' prop='activeFlag' v-if='columns[8].visible'> <el-table-column label='激活标识' align='center' prop='activeFlag' v-if='columns[8].visible'>
<template #default='scope'> <template #default='scope'>
<dict-tag :options='active_flag' :value='scope.row.activeFlag' /> <dict-tag :options='active_flag' :value='scope.row.activeFlag' />
@ -100,14 +104,15 @@
<el-table-column label='备注' align='center' prop='remark' v-if='columns[9].visible' /> <el-table-column label='备注' align='center' prop='remark' v-if='columns[9].visible' />
<el-table-column label='操作' align='center' class-name='small-padding fixed-width'> <el-table-column label='操作' align='center' class-name='small-padding fixed-width'>
<template #default='scope'> <template #default='scope'>
<el-tooltip content='修改' placement='top'> <el-tooltip content='步序' placement='top'>
<el-button link type='primary' icon='Edit' @click='handleUpdate(scope.row)' <el-button link type='primary' @click='handleStepUpdate(scope.row)'
v-hasPermi="['mes:technologyInfo:edit']"></el-button> v-hasPermi="['mes:technologyInfo:edit']">步序
</el-tooltip> </el-button>
<el-tooltip content='删除' placement='top'>
<el-button link type='primary' icon='Delete' @click='handleDelete(scope.row)'
v-hasPermi="['mes:technologyInfo:remove']"></el-button>
</el-tooltip> </el-tooltip>
<!-- <el-tooltip content='删除' placement='top'>-->
<!-- <el-button link type='primary' icon='Delete' @click='handleDelete(scope.row)'-->
<!-- v-hasPermi="['mes:technologyInfo:remove']"></el-button>-->
<!-- </el-tooltip>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -119,19 +124,21 @@
<el-dialog :title='dialog.title' v-model='dialog.visible' width='500px' append-to-body> <el-dialog :title='dialog.title' v-model='dialog.visible' width='500px' append-to-body>
<el-form ref='technologyInfoFormRef' :model='form' :rules='rules' label-width='100px'> <el-form ref='technologyInfoFormRef' :model='form' :rules='rules' label-width='100px'>
<el-form-item label='工序ID' prop='processId'> <el-form-item label='工序ID' prop='processId'>
<el-select v-model="form.processId" placeholder="请选择所属工序"> <el-select v-model='form.processId' placeholder='请选择所属工序'>
<el-option <el-option
v-for="item in processInfoList" v-for='item in processInfoList'
:key="item.processId" :key='item.processId'
:label="item.processName" :label='item.processName'
:value="item.processId" :value='item.processId'
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label='物料名称' prop='materialId'> <el-form-item label='物料名称' prop='materialId'>
<el-input v-model="form.materialName" placeholder="请点击检索物料" @click="handleMaterialAdd" readonly> <el-input v-model='form.materialName' placeholder='请点击检索物料' @click='handleMaterialAdd' readonly>
<template #append> <template #append>
<el-icon class="el-input__icon" ><search/></el-icon> <el-icon class='el-input__icon'>
<search />
</el-icon>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -159,7 +166,15 @@
<el-input v-model='form.technologyVersion' placeholder='请输入工艺版本' /> <el-input v-model='form.technologyVersion' placeholder='请输入工艺版本' />
</el-form-item> </el-form-item>
<el-form-item label='硫化标准时间' prop='standardTime'> <el-form-item label='硫化标准时间' prop='standardTime'>
<el-input-number v-model='form.standardTime' placeholder='请输入硫化标准时间' style="width: 220px;"/> <el-input-number v-model='form.productionTimeDays' placeholder='请输入天数' :min='0' :max='10000'
:controls='false' :style="{ width: '50px' }" />
<span>&nbsp;&nbsp;</span>
<el-input-number v-model='form.productionTimeHours' placeholder='请输入小时' :min='0' :max='23'
:controls='false' :style="{ width: '50px' }" />
<span>&nbsp;小时&nbsp;</span>
<el-input-number v-model='form.productionTimeMinutes' placeholder='请输入分钟' :min='0' :max='59'
:controls='false' :style="{ width: '50px' }" />
<span>&nbsp;分钟&nbsp;</span>
</el-form-item> </el-form-item>
<el-form-item label='激活标识' prop='activeFlag'> <el-form-item label='激活标识' prop='activeFlag'>
<el-radio-group v-model='form.activeFlag'> <el-radio-group v-model='form.activeFlag'>
@ -185,18 +200,127 @@
</div> </div>
<!-- 添加物料信息对话框 --> <!-- 添加物料信息对话框 -->
<el-dialog title="选择物料信息" v-model="materialOpen" width='1200px' append-to-body> <el-dialog title='选择物料信息' v-model='materialOpen' width='1200px' append-to-body>
<MaterialSelect @selection="handleSelection" ref="materialSelectRef" v-if="materialOpen"></MaterialSelect> <MaterialSelect @selection='handleSelection' ref='materialSelectRef' v-if='materialOpen'></MaterialSelect>
<div slot="footer" class="dialog-footer"> <div slot='footer' class='dialog-footer'>
<el-button type="primary" @click="submitMaterialForm"> </el-button> <el-button type='primary' @click='submitMaterialForm'> </el-button>
<el-button @click="materialOpen = false"> </el-button> <el-button @click='materialOpen = false'> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div>
<!-- 添加或修改工序工艺信息对话框 -->
<el-dialog :title='dialog.title' v-model='stepOpen' width='1100px' append-to-body>
<el-form ref='technologyInfoFormRef' :model='form' :rules='rules' label-width='100px'>
<el-row :gutter='10' class='mb8'>
<el-col :span='12'>
<el-form-item label='工序' prop='processId'>
<el-select v-model='form.processId' placeholder='请选择所属工序' disabled>
<el-option
v-for='item in processInfoList'
:key='item.processId'
:label='item.processName'
:value='item.processId'
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label='物料名称' prop='materialName'>
<el-input v-model='form.materialName' placeholder='请输入物料名称' disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter='10' class='mb8'>
<el-col :span='12'>
<el-form-item label='机台类型' prop='machineType'>
<el-select v-model='form.machineType' placeholder='请选择机台类型' disabled>
<el-option
v-for='dict in mes_machine_type'
:key='dict.value'
:label='dict.label'
:value='dict.value'
></el-option>
</el-select>
</el-form-item>
<el-form-item label='工艺类型' prop='technologyType'>
<el-select v-model='form.technologyType' placeholder='请选择工艺类型' disabled>
<el-option
v-for='dict in mes_technology_type'
:key='dict.value'
:label='dict.label'
:value='dict.value'
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label='工艺版本' prop='technologyVersion'>
<el-input v-model='form.technologyVersion' placeholder='请输入工艺版本' disabled />
</el-form-item>
</el-col>
</el-row>
<el-divider content-position='center'>工艺步序信息</el-divider>
<el-row :gutter='10' class='mb8'>
<el-col :span='1.5'>
<el-button type='primary' plain icon='Plus' @click='handleAddStep'>添加</el-button>
</el-col>
<el-col :span='1.5'>
<el-button type='danger' icon='Delete' @click='handleDeleteProdLine'>删除</el-button>
</el-col>
</el-row>
<el-table :data='prodTechnologyStepInfoList' :row-class-name='rowProdBaseProcessProdlineIndex'
@selection-change='handleProdLineSelectionChange'>
<el-table-column type='selection' width='50' align='center' />
<el-table-column label='序号' width='50' align='center' prop='index' />
<el-table-column align='center' label='步序编号' prop='stepCode'>
<template #default='scope'>
<!-- <el-input v-model='scope.row.stepCode' :disabled='true' placeholder='请输入步序编号' />-->
<el-input v-model='scope.row.stepCode' placeholder='请输入步序编号' />
</template>
</el-table-column>
<el-table-column align='center' label='步序名称' prop='stepName'>
<template #default='scope'>
<el-input v-model='scope.row.stepName' placeholder='请输入步序名称' />
</template>
</el-table-column>
<el-table-column align='center' label='步序时间' prop='stepTime'>
<template #default='scope'>
<el-input v-model='scope.row.stepTime' placeholder='请输入步序时间' />
</template>
</el-table-column>
<el-table-column align='center' label='步序参数' prop='stepParameter'>
<template #default='scope'>
<el-input v-model='scope.row.stepParameter' placeholder='请输入步序参数' />
</template>
</el-table-column>
<el-table-column align='center' label='阀门状态' prop='valueState'>
<template #default='scope'>
<el-input v-model='scope.row.valueState' placeholder='请输入阀门状态' />
</template>
</el-table-column>
<el-table-column align='center' label='激活标识' prop='activeFlag'>
<template #default='scope'>
<el-select v-model='scope.row.activeFlag' placeholder='请输入激活标识' >
<el-option v-for="dict in active_flag" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</template>
</el-table-column>
</el-table>
</el-form>
<template #footer>
<div class='dialog-footer'>
<el-button :loading='buttonLoading' type='primary' @click='submitForm'> </el-button>
<el-button @click='cancelStep'> </el-button>
</div>
</template>
</el-dialog>
</div>
</template> </template>
<script setup lang='ts'> <script setup name='TechnologyInfo' lang='ts'>
import { import {
listTechnologyInfo, listTechnologyInfo,
getTechnologyInfo, getTechnologyInfo,
@ -237,6 +361,11 @@ const processInfoList = ref([]);
const materialOpen = ref(false); const materialOpen = ref(false);
const materialSelectRef = ref(); const materialSelectRef = ref();
const stepOpen = ref(false);
const prodTechnologyStepInfoList = ref([]);
const chekedProdLineList = ref([]);
/** 查询工位下拉树结构 */ /** 查询工位下拉树结构 */
const getProcessInfoListSelect = async () => { const getProcessInfoListSelect = async () => {
let res = await getProcessInfoList(null); let res = await getProcessInfoList(null);
@ -270,8 +399,12 @@ const initFormData: TechnologyInfoForm = {
technologyType: undefined, technologyType: undefined,
technologyVersion: undefined, technologyVersion: undefined,
standardTime: undefined, standardTime: undefined,
productionTimeDays: 0,
productionTimeHours: 0,
productionTimeMinutes: 0,
activeFlag: '1', activeFlag: '1',
remark: undefined remark: undefined,
prodTechnologyStepInfoList: []
}; };
const data = reactive<PageData<TechnologyInfoForm, TechnologyInfoQuery>>({ const data = reactive<PageData<TechnologyInfoForm, TechnologyInfoQuery>>({
form: { ...initFormData }, form: { ...initFormData },
@ -314,7 +447,6 @@ const cancel = () => {
reset(); reset();
dialog.visible = false; dialog.visible = false;
}; };
/** 表单重置 */ /** 表单重置 */
const reset = () => { const reset = () => {
form.value = { ...initFormData }; form.value = { ...initFormData };
@ -333,6 +465,12 @@ const resetQuery = () => {
handleQuery(); handleQuery();
}; };
const cancelStep = () => {
reset();
stepOpen.value = false;
prodTechnologyStepInfoList.value = [];
};
/** 多选框选中数据 */ /** 多选框选中数据 */
const handleSelectionChange = (selection: TechnologyInfoVO[]) => { const handleSelectionChange = (selection: TechnologyInfoVO[]) => {
ids.value = selection.map(item => item.technologyId); ids.value = selection.map(item => item.technologyId);
@ -357,18 +495,36 @@ const handleUpdate = async (row?: TechnologyInfoVO) => {
dialog.title = '修改工序工艺信息'; dialog.title = '修改工序工艺信息';
}; };
/** 工艺步序信息维护按钮操作 */
const handleStepUpdate = async (row?: TechnologyInfoVO) => {
reset();
const _technologyId = row?.technologyId || ids.value[0];
const res = await getTechnologyInfo(_technologyId);
Object.assign(form.value, res.data);
prodTechnologyStepInfoList.value = form.value.prodTechnologyStepInfoList.map((item, index) => ({
...item,
index: index + 1 // index
}));
stepOpen.value = true;
dialog.title = '工艺步序信息维护';
};
/** 提交按钮 */ /** 提交按钮 */
const submitForm = () => { const submitForm = () => {
technologyInfoFormRef.value?.validate(async (valid: boolean) => { technologyInfoFormRef.value?.validate(async (valid: boolean) => {
if (valid) { if (valid) {
buttonLoading.value = true; buttonLoading.value = true;
convertToSeconds();
if (form.value.technologyId) { if (form.value.technologyId) {
form.value.prodTechnologyStepInfoList = prodTechnologyStepInfoList;
await updateTechnologyInfo(form.value).finally(() => buttonLoading.value = false); await updateTechnologyInfo(form.value).finally(() => buttonLoading.value = false);
} else { } else {
await addTechnologyInfo(form.value).finally(() => buttonLoading.value = false); await addTechnologyInfo(form.value).finally(() => buttonLoading.value = false);
} }
proxy?.$modal.msgSuccess('操作成功'); proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false; dialog.visible = false;
stepOpen.value = false;
form.value.prodTechnologyStepInfoList = [];
await getList(); await getList();
} }
}); });
@ -393,15 +549,71 @@ const handleExport = () => {
/** 新增按钮操作 */ /** 新增按钮操作 */
const handleMaterialAdd = () => { const handleMaterialAdd = () => {
materialOpen.value = true; materialOpen.value = true;
} };
/** 天小时分钟转换为秒 */
const convertToSeconds = () => {
const daysInSeconds = form.value.productionTimeDays * 24 * 60 * 60;
const hoursInSeconds = form.value.productionTimeHours * 60 * 60;
const minutesInSeconds = form.value.productionTimeMinutes * 60;
form.value.standardTime = daysInSeconds + hoursInSeconds + minutesInSeconds;
};
/** 秒转换为天小时分钟 */
const convertToTime = () => {
const totalSeconds = form.value.standardTime;
const days = Math.floor(totalSeconds / (24 * 60 * 60));
const hours = Math.floor((totalSeconds % (24 * 60 * 60)) / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
//
form.value.productionTimeDays = days;
form.value.productionTimeHours = hours;
form.value.productionTimeMinutes = minutes;
};
/** 提交物料BOM信息按钮 */ /** 提交物料BOM信息按钮 */
const submitMaterialForm = () => { const submitMaterialForm = () => {
let selectedRow = materialSelectRef.value.tableRef.store.states.currentRow.value; let selectedRow = materialSelectRef.value.tableRef.store.states.currentRow.value;
form.value.materialId = selectedRow.materialId form.value.materialId = selectedRow.materialId;
form.value.materialName = selectedRow.materialName form.value.materialName = selectedRow.materialName;
materialOpen.value = false; materialOpen.value = false;
};
// 线
const handleAddStep = () => {
return prodTechnologyStepInfoList.value.push({
technologyId: form.value.technologyId, // technologyId
index: prodTechnologyStepInfoList.value.length + 1,
activeFlag: '1'
});
};
const rowProdBaseProcessProdlineIndex = ({ row, rowIndex }: { row: any; rowIndex: number }): string => {
//
if (row.someCondition) {
return 'custom-class';
} }
return '';
};
// 线
const handleDeleteProdLine = () => {
if (chekedProdLineList.value.length === 0) {
proxy?.$modal.msgError('请先选择要删除的工序关联产线数据');
} else {
prodTechnologyStepInfoList.value = prodTechnologyStepInfoList.value
.filter(item => !chekedProdLineList.value.includes(item.index))
.map((item, index) => ({
...item,
index: index + 1 // index
}));
}
};
// 线
const handleProdLineSelectionChange = (selection) => {
chekedProdLineList.value = selection.map(item => item.index);
};
onMounted(() => { onMounted(() => {
getProcessInfoListSelect(); getProcessInfoListSelect();

Loading…
Cancel
Save