|
|
@ -77,7 +77,7 @@
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">BOM明细</span>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">BOM明细</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col v-if="active != 'detail'">
|
|
|
|
<el-col v-if="!detailDisabled">
|
|
|
|
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button>
|
|
|
|
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col>
|
|
|
|
<el-col>
|
|
|
@ -88,7 +88,7 @@
|
|
|
|
<el-table-column label="是否标准件" prop="type" width="200">
|
|
|
|
<el-table-column label="是否标准件" prop="type" width="200">
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<el-form-item :prop="`${$index}.type`" :rules="subFormRules.type" class="mb-0px!">
|
|
|
|
<el-form-item :prop="`${$index}.type`" :rules="subFormRules.type" class="mb-0px!">
|
|
|
|
<el-radio-group v-model="row.type" @change="(val) => {onChangeType(row, val);}">
|
|
|
|
<el-radio-group :disabled="detailDisabled" v-model="row.type" @change="(val) => {onChangeType(row, val);}">
|
|
|
|
<el-radio
|
|
|
|
<el-radio
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_BOM_MATERIAL_TYPE)"
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_BOM_MATERIAL_TYPE)"
|
|
|
|
:key="dict.value"
|
|
|
|
:key="dict.value"
|
|
|
@ -104,8 +104,8 @@
|
|
|
|
<template #header><span class="hl-table_header">*</span>零件名称</template>
|
|
|
|
<template #header><span class="hl-table_header">*</span>零件名称</template>
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<el-form-item :prop="`${$index}.materialName`" :rules="subFormRules.materialName" class="mb-0px!">
|
|
|
|
<el-form-item :prop="`${$index}.materialName`" :rules="subFormRules.materialName" class="mb-0px!">
|
|
|
|
<MaterialSelect v-if="row.type == '1'" v-model="row.materialId" @update:newValue="(val) => {handleSelectedMaterial(row, val);}"/>
|
|
|
|
<MaterialSelect :disabled="detailDisabled" v-if="row.type == '1'" v-model="row.materialId" @update:newValue="(val) => {handleSelectedMaterial(row, val);}"/>
|
|
|
|
<el-input v-else v-model="row.materialName" />
|
|
|
|
<el-input :disabled="detailDisabled" v-else v-model="row.materialName" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
@ -114,21 +114,21 @@
|
|
|
|
<template #header><span class="hl-table_header">*</span>材质</template>
|
|
|
|
<template #header><span class="hl-table_header">*</span>材质</template>
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<el-form-item :prop="`${$index}.compositionId`" :rules="subFormRules.compositionId" class="mb-0px!">
|
|
|
|
<el-form-item :prop="`${$index}.compositionId`" :rules="subFormRules.compositionId" class="mb-0px!">
|
|
|
|
<CompositionSelect v-model="row.compositionId" @update:newValue="(val) => {row.compositionId = val.id;}"/>
|
|
|
|
<CompositionSelect :disabled="detailDisabled" v-model="row.compositionId" @update:newValue="(val) => {row.compositionId = val.id;}"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="规格型号" prop="spec" width="140">
|
|
|
|
<el-table-column label="规格型号" prop="spec" width="140">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
<span v-if="scope.row.type == '1'" v-html="scope.row.spec"></span>
|
|
|
|
<span v-if="scope.row.type == '1'" v-html="scope.row.spec"></span>
|
|
|
|
<el-input v-else v-model="scope.row.spec" />
|
|
|
|
<el-input :disabled="detailDisabled" v-else v-model="scope.row.spec" />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="图号" prop="blueprintNo" width="150">
|
|
|
|
<el-table-column label="图号" prop="blueprintNo" width="150">
|
|
|
|
<template #header><span class="hl-table_header">*</span>图号</template>
|
|
|
|
<template #header><span class="hl-table_header">*</span>图号</template>
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<el-form-item :prop="`${$index}.blueprintNo`" :rules="subFormRules.blueprintNo" class="mb-0px!">
|
|
|
|
<el-form-item :prop="`${$index}.blueprintNo`" :rules="subFormRules.blueprintNo" class="mb-0px!">
|
|
|
|
<el-input v-model="row.blueprintNo" />
|
|
|
|
<el-input :disabled="detailDisabled" v-model="row.blueprintNo" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
@ -136,7 +136,7 @@
|
|
|
|
<template #header> <span class="hl-table_header">*</span>数量</template>
|
|
|
|
<template #header> <span class="hl-table_header">*</span>数量</template>
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<el-form-item :prop="`${$index}.amount`" :rules="subFormRules.amount" class="mb-0px!">
|
|
|
|
<el-form-item :prop="`${$index}.amount`" :rules="subFormRules.amount" class="mb-0px!">
|
|
|
|
<el-input-number min="0" step="1" step-strictly :disabled="detailDisabled || row.id" v-model="row.amount" />
|
|
|
|
<el-input-number min="0" step="1" step-strictly :disabled="detailDisabled" v-model="row.amount" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
@ -144,7 +144,8 @@
|
|
|
|
<template #header> <span class="hl-table_header">*</span>系统单位</template>
|
|
|
|
<template #header> <span class="hl-table_header">*</span>系统单位</template>
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
<el-form-item :prop="`${$index}.unit`" :rules="subFormRules.unit" class="mb-0px!">
|
|
|
|
<el-form-item :prop="`${$index}.unit`" :rules="subFormRules.unit" class="mb-0px!">
|
|
|
|
<el-select v-model="row.unit" clearable class="!w-250px">
|
|
|
|
<span v-if="row.type == '1'">{{getDictLabel(DICT_TYPE.HELI_MATERIAL_UNIT, row.unit)}}</span>
|
|
|
|
|
|
|
|
<el-select :disabled="detailDisabled" v-else v-model="row.unit" clearable class="!w-250px">
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)"
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)"
|
|
|
|
:key="dict.value"
|
|
|
|
:key="dict.value"
|
|
|
@ -157,7 +158,7 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="操作" align="center" width="160">
|
|
|
|
<el-table-column label="操作" align="center" width="160">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
<el-button link type="danger" size="small" @click.prevent="onDeleteItem(scope.$index)">
|
|
|
|
<el-button v-if="!detailDisabled" link type="danger" size="small" @click.prevent="onDeleteItem(scope.$index)">
|
|
|
|
删除
|
|
|
|
删除
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -184,7 +185,6 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="userNickname" label="操作人" align="center" />
|
|
|
|
<el-table-column prop="userNickname" label="操作人" align="center" />
|
|
|
|
<el-table-column label="操作时间" align="center" prop="startTime" :formatter="dateFormatter" />
|
|
|
|
<el-table-column label="操作时间" align="center" prop="startTime" :formatter="dateFormatter" />
|
|
|
|
<el-table-column prop="content" label="操作意见" align="center" />
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -289,6 +289,10 @@ const queryData = async (id?: number) => {
|
|
|
|
formData.value = await ProcessBomApi.getProcessBom(id)
|
|
|
|
formData.value = await ProcessBomApi.getProcessBom(id)
|
|
|
|
formData.value.processBomDetails = await ProcessBomApi.getProcessBomDetailListByBomId(id)
|
|
|
|
formData.value.processBomDetails = await ProcessBomApi.getProcessBomDetailListByBomId(id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(formData.value.bomStatus == 2) {
|
|
|
|
|
|
|
|
detailDisabled.value = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 操作日志
|
|
|
|
// 操作日志
|
|
|
|
let logParams = {
|
|
|
|
let logParams = {
|
|
|
|
pageNo: 1,
|
|
|
|
pageNo: 1,
|
|
|
|