|
|
|
@ -5,14 +5,8 @@ |
|
|
|
<!-- 工艺级别:--> |
|
|
|
<!-- 工艺级别:--> |
|
|
|
<el-form :model="form" label-width="auto"> |
|
|
|
<el-form :model="form" label-width="auto"> |
|
|
|
<el-form-item label="工艺级别:"> |
|
|
|
<el-form-item label="工艺级别:"> |
|
|
|
<el-select |
|
|
|
<el-select v-model="rank" placeholder="请选择" style="width: 220px" @change="leavelChange" clearable |
|
|
|
v-model="rank" |
|
|
|
filterable> |
|
|
|
placeholder="请选择" |
|
|
|
|
|
|
|
style="width: 220px" |
|
|
|
|
|
|
|
@change="leavelChange" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option label="一级工艺" value="1" /> |
|
|
|
<el-option label="一级工艺" value="1" /> |
|
|
|
<el-option label="二级工艺" value="2" /> |
|
|
|
<el-option label="二级工艺" value="2" /> |
|
|
|
<el-option label="三级工艺" value="3" /> |
|
|
|
<el-option label="三级工艺" value="3" /> |
|
|
|
@ -20,36 +14,15 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-tree |
|
|
|
<el-tree ref="tree" :data="data" :props="defaultProps" node-key="id" @node-click="handleNodeClick" |
|
|
|
ref="tree" |
|
|
|
@node-contextmenu="handleNodeRightClick" default-expand-all :expand-on-click-node="false" /> |
|
|
|
:data="data" |
|
|
|
<div v-show="contextMenuVisible" class="custom-context-menu" |
|
|
|
:props="defaultProps" |
|
|
|
:style="{ top: contextMenuTop + 'px', left: contextMenuLeft + 'px' }"> |
|
|
|
node-key="id" |
|
|
|
|
|
|
|
@node-click="handleNodeClick" |
|
|
|
|
|
|
|
@node-contextmenu="handleNodeRightClick" |
|
|
|
|
|
|
|
default-expand-all |
|
|
|
|
|
|
|
:expand-on-click-node="false" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
v-show="contextMenuVisible" |
|
|
|
|
|
|
|
class="custom-context-menu" |
|
|
|
|
|
|
|
:style="{ top: contextMenuTop + 'px', left: contextMenuLeft + 'px' }" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="context-menu"> |
|
|
|
<div class="context-menu"> |
|
|
|
<el-button |
|
|
|
<el-button link type="primary" @click="handleCopyNode" v-if="contextTreeNode && contextTreeNode.level === 2"> |
|
|
|
link |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="handleCopyNode" |
|
|
|
|
|
|
|
v-if="contextTreeNode && contextTreeNode.level === 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
复制 |
|
|
|
复制 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
<el-button link type="danger" @click="handleDeleteNode" v-if="contextTreeNode && contextTreeNode.level === 2"> |
|
|
|
link |
|
|
|
|
|
|
|
type="danger" |
|
|
|
|
|
|
|
@click="handleDeleteNode" |
|
|
|
|
|
|
|
v-if="contextTreeNode && contextTreeNode.level === 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
删除 |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -60,18 +33,8 @@ |
|
|
|
<el-row :gutter="24" v-if="activeName == '1'"> |
|
|
|
<el-row :gutter="24" v-if="activeName == '1'"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="重要度:" prop="prority"> |
|
|
|
<el-form-item label="重要度:" prop="prority"> |
|
|
|
<el-select |
|
|
|
<el-select v-model="treeNodes.rawData.prority" :placeholder="'请选择'" clearable filterable> |
|
|
|
v-model="treeNodes.rawData.prority" |
|
|
|
<el-option v-for="item in priorityList" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
:placeholder="'请选择'" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in priorityList" |
|
|
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
@ -90,11 +53,7 @@ |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
|
|
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
|
|
|
<el-tab-pane |
|
|
|
<el-tab-pane label="工艺维护" name="1" v-if="treeLeave == 1 || treeLeave == 2"></el-tab-pane> |
|
|
|
label="工艺维护" |
|
|
|
|
|
|
|
name="1" |
|
|
|
|
|
|
|
v-if="treeLeave == 1 || treeLeave == 2" |
|
|
|
|
|
|
|
></el-tab-pane> |
|
|
|
|
|
|
|
<el-tab-pane label="项目" name="2" v-if="treeLeave == 3"></el-tab-pane> |
|
|
|
<el-tab-pane label="项目" name="2" v-if="treeLeave == 3"></el-tab-pane> |
|
|
|
<el-tab-pane label="尺寸、量具" name="3" v-if="treeLeave == 3"></el-tab-pane> |
|
|
|
<el-tab-pane label="尺寸、量具" name="3" v-if="treeLeave == 3"></el-tab-pane> |
|
|
|
<el-tab-pane label="工装、模具表" name="4" v-if="treeLeave == 3"></el-tab-pane> |
|
|
|
<el-tab-pane label="工装、模具表" name="4" v-if="treeLeave == 3"></el-tab-pane> |
|
|
|
@ -106,65 +65,30 @@ |
|
|
|
<el-button type="primary" @click="saveInfo()" :loading="craftLoading">保存</el-button> |
|
|
|
<el-button type="primary" @click="saveInfo()" :loading="craftLoading">保存</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="table-btn-right" v-if="activeName == '1'"> |
|
|
|
<div class="table-btn-right" v-if="activeName == '1'"> |
|
|
|
<el-cascader |
|
|
|
<el-cascader v-model="modelLevel" :options="filteredList" :props="{ expandTrigger: 'hover' }" |
|
|
|
v-model="modelLevel" |
|
|
|
placeholder="选择工艺模板" style="width: 220px; margin-right: 12px" clearable filterable></el-cascader> |
|
|
|
:options="filteredList" |
|
|
|
|
|
|
|
:props="{ expandTrigger: 'hover' }" |
|
|
|
<el-button type="primary" @click="modelLevelChange()" :loading="modelLevelLoading">导入模板</el-button> |
|
|
|
placeholder="选择工艺模板" |
|
|
|
|
|
|
|
style="width: 220px; margin-right: 12px" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
></el-cascader> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-button type="primary" @click="modelLevelChange()" :loading="modelLevelLoading" |
|
|
|
|
|
|
|
>导入模板</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="table-btn-right" v-if="activeName == '2'"> |
|
|
|
<div class="table-btn-right" v-if="activeName == '2'"> |
|
|
|
<el-cascader |
|
|
|
<el-cascader v-model="cascaderValue" :props="{ expandTrigger: 'hover' }" :options="cascaderOptions" |
|
|
|
v-model="cascaderValue" |
|
|
|
style="width: 260px; height: 30px; margin: 0 12px" class="trialitemModel" @change="handleChange" clearable |
|
|
|
:props="{ expandTrigger: 'hover' }" |
|
|
|
filterable /> |
|
|
|
:options="cascaderOptions" |
|
|
|
<el-button type="primary" @click="importInspectionTemplate" :loading="modelLevelLoading">导入模板</el-button> |
|
|
|
style="width: 260px; height: 30px; margin: 0 12px" |
|
|
|
|
|
|
|
class="trialitemModel" |
|
|
|
|
|
|
|
@change="handleChange" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<el-button type="primary" @click="importInspectionTemplate" :loading="modelLevelLoading" |
|
|
|
|
|
|
|
>导入模板</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 工序 --> |
|
|
|
<!-- 工序 --> |
|
|
|
<el-form |
|
|
|
<el-form ref="tableForm1" :model="form1" :rules="formRules1" label-width="0px" v-if="activeName == '1'"> |
|
|
|
ref="tableForm1" |
|
|
|
<el-table :data="form1.tableData1" style="width: 100%" @selection-change="handleSelectionChange1" |
|
|
|
:model="form1" |
|
|
|
:height="tableHeight"> |
|
|
|
:rules="formRules1" |
|
|
|
|
|
|
|
label-width="0px" |
|
|
|
|
|
|
|
v-if="activeName == '1'" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
|
|
:data="form1.tableData1" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange1" |
|
|
|
|
|
|
|
:height="tableHeight" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column prop="processNo" label="工序号"> |
|
|
|
<el-table-column prop="processNo" label="工序号"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<span><i style="color: red">*</i>工序号</span> |
|
|
|
<span><i style="color: red">*</i>工序号</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item :prop="`tableData1[${scope.$index}].processNo`" :rules="formRules1.processNo"> |
|
|
|
:prop="`tableData1[${scope.$index}].processNo`" |
|
|
|
<el-input v-model="scope.row.processNo" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
:rules="formRules1.processNo" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="scope.row.processNo" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
@ -174,19 +98,10 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData1[${scope.$index}].ppsId`" :rules="formRules1.ppsId"> |
|
|
|
<el-form-item :prop="`tableData1[${scope.$index}].ppsId`" :rules="formRules1.ppsId"> |
|
|
|
<el-select |
|
|
|
<el-select v-model="scope.row.ppsId" placeholder="请选择" clearable filterable |
|
|
|
v-model="scope.row.ppsId" |
|
|
|
@change="processChange(scope.row, scope.$index)"> |
|
|
|
placeholder="请选择" |
|
|
|
<el-option v-for="(item, index) in processSetOption" :key="index" :label="`${item.code}-${item.name}`" |
|
|
|
clearable |
|
|
|
:value="item.id"></el-option> |
|
|
|
filterable |
|
|
|
|
|
|
|
@change="processChange(scope.row, scope.$index)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="(item, index) in processSetOption" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="`${item.code}-${item.name}`" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
></el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -197,19 +112,10 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData1[${scope.$index}].caId`" :rules="formRules1.caId"> |
|
|
|
<el-form-item :prop="`tableData1[${scope.$index}].caId`" :rules="formRules1.caId"> |
|
|
|
<el-select |
|
|
|
<el-select v-model="scope.row.caId" placeholder="请选择" clearable filterable |
|
|
|
v-model="scope.row.caId" |
|
|
|
@change="craftChange(scope.row, scope.$index)"> |
|
|
|
placeholder="请选择" |
|
|
|
<el-option v-for="(item, index) in craftAbilityOption" :key="index" |
|
|
|
clearable |
|
|
|
:label="`${item.caCode}-${item.caName}`" :value="item.id"></el-option> |
|
|
|
filterable |
|
|
|
|
|
|
|
@change="craftChange(scope.row, scope.$index)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="(item, index) in craftAbilityOption" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="`${item.caCode}-${item.caName}`" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
></el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -240,27 +146,13 @@ |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<!-- 项目 --> |
|
|
|
<!-- 项目 --> |
|
|
|
<el-form |
|
|
|
<el-form ref="tableForm2" :model="form2" :rules="formRules2" label-width="0px" v-if="activeName == '2'"> |
|
|
|
ref="tableForm2" |
|
|
|
<el-table :data="form2.tableData2" style="width: 100%" @selection-change="handleSelectionChange2" |
|
|
|
:model="form2" |
|
|
|
:height="tableHeight"> |
|
|
|
:rules="formRules2" |
|
|
|
|
|
|
|
label-width="0px" |
|
|
|
|
|
|
|
v-if="activeName == '2'" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
|
|
:data="form2.tableData2" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange2" |
|
|
|
|
|
|
|
:height="tableHeight" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column prop="trialNo" label="项目编号"> |
|
|
|
<el-table-column prop="trialNo" label="项目编号"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.trialNo" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.trialNo" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="projectCode" label="检验项目"> |
|
|
|
<el-table-column prop="projectCode" label="检验项目"> |
|
|
|
@ -268,23 +160,11 @@ |
|
|
|
<span><i style="color: red">*</i>检验项目</span> |
|
|
|
<span><i style="color: red">*</i>检验项目</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item :prop="`tableData2[${scope.$index}].projectCode`" :rules="formRules2.projectCode"> |
|
|
|
:prop="`tableData2[${scope.$index}].projectCode`" |
|
|
|
<el-select v-model="scope.row.projectCode" placeholder="请选择" clearable filterable |
|
|
|
:rules="formRules2.projectCode" |
|
|
|
@change="projectChange(scope.row, scope.$index)"> |
|
|
|
> |
|
|
|
<el-option v-for="(item, index) in projectOptions" :key="index" :label="`${item.code}-${item.name}`" |
|
|
|
<el-select |
|
|
|
:value="item.id"></el-option> |
|
|
|
v-model="scope.row.projectCode" |
|
|
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
@change="projectChange(scope.row, scope.$index)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="(item, index) in projectOptions" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="`${item.code}-${item.name}`" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
></el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -294,77 +174,40 @@ |
|
|
|
<span><i style="color: red">*</i>检验标准</span> |
|
|
|
<span><i style="color: red">*</i>检验标准</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item :prop="`tableData2[${scope.$index}].projectStandard`" :rules="formRules2.projectStandard"> |
|
|
|
:prop="`tableData2[${scope.$index}].projectStandard`" |
|
|
|
<el-select v-model="scope.row.projectStandard" placeholder="请选择" clearable filterable |
|
|
|
:rules="formRules2.projectStandard" |
|
|
|
@change="standardChange(scope.row, scope.$index)"> |
|
|
|
> |
|
|
|
<el-option v-for="(item, index) in standardList" :key="index" :label="item.name" |
|
|
|
<el-select |
|
|
|
:value="item.id"></el-option> |
|
|
|
v-model="scope.row.projectStandard" |
|
|
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
@change="standardChange(scope.row, scope.$index)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="(item, index) in standardList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
></el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="proHours" label="定额工时(分钟)"> |
|
|
|
<!-- <el-table-column prop="proHours" label="定额工时(分钟)"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<span><i style="color: red">*</i>定额工时(分钟)</span> |
|
|
|
<span><i style="color: red">*</i>定额工时(分钟)</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item :prop="`tableData2[${scope.$index}].proHours`" :rules="formRules2.proHours"> |
|
|
|
:prop="`tableData2[${scope.$index}].proHours`" |
|
|
|
<el-input v-model="scope.row.proHours" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
:rules="formRules2.proHours" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="scope.row.proHours" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="prepareHours" label="准备工时(分钟)"> |
|
|
|
<el-table-column prop="prepareHours" label="准备工时(分钟)"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.prepareHours" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.prepareHours" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<!-- 量具 --> |
|
|
|
<!-- 量具 --> |
|
|
|
<el-form |
|
|
|
<el-form ref="tableForm3" :model="form3" :rules="formRules3" label-width="0px" v-if="activeName == '3'"> |
|
|
|
ref="tableForm3" |
|
|
|
<el-table :data="form3.tableData3" :height="tableHeight" style="width: 100%" |
|
|
|
:model="form3" |
|
|
|
@selection-change="handleSelectionChange3"> |
|
|
|
:rules="formRules3" |
|
|
|
|
|
|
|
label-width="0px" |
|
|
|
|
|
|
|
v-if="activeName == '3'" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
|
|
:data="form3.tableData3" |
|
|
|
|
|
|
|
:height="tableHeight" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange3" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column prop="trialNo" label="项目编号"> |
|
|
|
<el-table-column prop="trialNo" label="项目编号"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.trialNo" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.trialNo" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="testType" label="镀前镀后"> |
|
|
|
<el-table-column prop="testType" label="镀前镀后"> |
|
|
|
@ -372,10 +215,7 @@ |
|
|
|
<span><i style="color: red">*</i>镀前镀后</span> |
|
|
|
<span><i style="color: red">*</i>镀前镀后</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item :prop="`tableData3[${scope.$index}].testType`" :rules="formRules3.testType"> |
|
|
|
:prop="`tableData3[${scope.$index}].testType`" |
|
|
|
|
|
|
|
:rules="formRules3.testType" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-select v-model="scope.row.testType" placeholder="请选择" clearable filterable> |
|
|
|
<el-select v-model="scope.row.testType" placeholder="请选择" clearable filterable> |
|
|
|
<el-option label="是" value="1"></el-option> |
|
|
|
<el-option label="是" value="1"></el-option> |
|
|
|
<el-option label="否" value="2"></el-option> |
|
|
|
<el-option label="否" value="2"></el-option> |
|
|
|
@ -389,113 +229,59 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :prop="`tableData3[${scope.$index}].mtId`" :rules="formRules3.mtId"> |
|
|
|
<el-form-item :prop="`tableData3[${scope.$index}].mtId`" :rules="formRules3.mtId"> |
|
|
|
<jhSelect |
|
|
|
<jhSelect v-model="scope.row.mtId" placeholder="请搜索选择" api-url="/blade-desk/measurementRecords/page" |
|
|
|
v-model="scope.row.mtId" |
|
|
|
echo-api="/blade-desk/measurementRecords/page" echoParamsKey="ids" echo-method="get" api-method="get" |
|
|
|
placeholder="请搜索选择" |
|
|
|
list-key="records" total-key="total" label-key="mcName" value-key="id" search-key="mcName" |
|
|
|
api-url="/blade-desk/measurementRecords/page" |
|
|
|
:params="{ cmType: 1 }" :debounce-time="500" :title="'修改'" |
|
|
|
echo-api="/blade-desk/measurementRecords/page" |
|
|
|
@change="(val, item) => changeMtId(val, item, scope.$index)" /> |
|
|
|
echoParamsKey="ids" |
|
|
|
|
|
|
|
echo-method="get" |
|
|
|
|
|
|
|
api-method="get" |
|
|
|
|
|
|
|
list-key="records" |
|
|
|
|
|
|
|
total-key="total" |
|
|
|
|
|
|
|
label-key="mcName" |
|
|
|
|
|
|
|
value-key="id" |
|
|
|
|
|
|
|
search-key="mcName" |
|
|
|
|
|
|
|
:params="{ cmType: 1 }" |
|
|
|
|
|
|
|
:debounce-time="500" |
|
|
|
|
|
|
|
:title="'修改'" |
|
|
|
|
|
|
|
@change="(val, item) => changeMtId(val, item, scope.$index)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="toolSize" label="量具尺寸"> |
|
|
|
<el-table-column prop="toolSize" label="量具尺寸"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.toolSize" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.toolSize" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="ruleSize" label="图纸尺寸"> |
|
|
|
<el-table-column prop="ruleSize" label="图纸尺寸"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.ruleSize" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.ruleSize" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<!-- 工装 --> |
|
|
|
<!-- 工装 --> |
|
|
|
<el-form |
|
|
|
<el-form ref="tableForm4" :model="form4" :rules="formRules4" label-width="0px" v-if="activeName == '4'"> |
|
|
|
ref="tableForm4" |
|
|
|
<el-table :data="form4.tableData4" style="width: 100%" @selection-change="handleSelectionChange4" |
|
|
|
:model="form4" |
|
|
|
:height="tableHeight"> |
|
|
|
:rules="formRules4" |
|
|
|
|
|
|
|
label-width="0px" |
|
|
|
|
|
|
|
v-if="activeName == '4'" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table |
|
|
|
|
|
|
|
:data="form4.tableData4" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange4" |
|
|
|
|
|
|
|
:height="tableHeight" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column prop="moldCode" label="对应工装"> |
|
|
|
<el-table-column prop="moldCode" label="对应工装"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<span><i style="color: red">*</i>对应工装</span> |
|
|
|
<span><i style="color: red">*</i>对应工装</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item :prop="`tableData4[${scope.$index}].moldCode`" :rules="formRules4.moldCode"> |
|
|
|
:prop="`tableData4[${scope.$index}].moldCode`" |
|
|
|
<el-input v-model="scope.row.moldCode" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
:rules="formRules4.moldCode" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="scope.row.moldCode" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="moldName" label="工装名称"> |
|
|
|
<el-table-column prop="moldName" label="工装名称"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.moldName" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.moldName" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="isPrint" label="是否印字"> |
|
|
|
<el-table-column prop="isPrint" label="是否印字"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.isPrint" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.isPrint" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="printNo" label="印字版编号"> |
|
|
|
<el-table-column prop="printNo" label="印字版编号"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.printNo" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.printNo" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="testFixtureNo" label="测试夹具号"> |
|
|
|
<el-table-column prop="testFixtureNo" label="测试夹具号"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-input |
|
|
|
<el-input v-model="scope.row.testFixtureNo" placeholder="请输入" style="width: 100%"></el-input> |
|
|
|
v-model="scope.row.testFixtureNo" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
@ -600,7 +386,7 @@ export default { |
|
|
|
formRules2: { |
|
|
|
formRules2: { |
|
|
|
projectCode: [{ required: true, message: '请选择', trigger: ['change', 'submit'] }], |
|
|
|
projectCode: [{ required: true, message: '请选择', trigger: ['change', 'submit'] }], |
|
|
|
projectStandard: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }], |
|
|
|
projectStandard: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }], |
|
|
|
proHours: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }], |
|
|
|
// proHours: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }], |
|
|
|
}, |
|
|
|
}, |
|
|
|
formRules3: { |
|
|
|
formRules3: { |
|
|
|
testType: [{ required: true, message: '请选择', trigger: ['change', 'submit'] }], |
|
|
|
testType: [{ required: true, message: '请选择', trigger: ['change', 'submit'] }], |
|
|
|
@ -1556,10 +1342,7 @@ export default { |
|
|
|
if (!noMainPro) { |
|
|
|
if (!noMainPro) { |
|
|
|
return this.$message.error('此套工艺未含主工序,请设置主工序!!!'); |
|
|
|
return this.$message.error('此套工艺未含主工序,请设置主工序!!!'); |
|
|
|
} |
|
|
|
} |
|
|
|
if (isReturn == 1) { |
|
|
|
|
|
|
|
return this.$message.warning('涂色标的工时定额必须大于0,请修改!'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// const res = await getPartDetail(this.partId); |
|
|
|
|
|
|
|
let dsCraftMold = this.partInfoData; |
|
|
|
let dsCraftMold = this.partInfoData; |
|
|
|
|
|
|
|
|
|
|
|
if (dsCraftMold.markingsTest == '1') { |
|
|
|
if (dsCraftMold.markingsTest == '1') { |
|
|
|
@ -1654,7 +1437,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// // penmark 喷码验证 |
|
|
|
// penmark 喷码验证 |
|
|
|
if (dsCraftMold.inkjetPrinting == '1') { |
|
|
|
if (dsCraftMold.inkjetPrinting == '1') { |
|
|
|
let flag = false; |
|
|
|
let flag = false; |
|
|
|
arr.forEach(item => { |
|
|
|
arr.forEach(item => { |
|
|
|
@ -1675,13 +1458,87 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 镀种信息或者工艺路线中是否包含清洗,判断主工序是否包含 清洗 无则警告提示 |
|
|
|
// 处理传参 |
|
|
|
const hasCleaningInPlateOrCraftWay = |
|
|
|
if (this.treeNodes.rawData.qualityGradeCode) { |
|
|
|
(this.partInfoData.plate && this.partInfoData.plate.includes('清洗')) || |
|
|
|
let qualityInfo = this.rankList.find( |
|
|
|
(this.partInfoData.craftWay && this.partInfoData.craftWay.includes('清洗')); |
|
|
|
item => item.code == this.treeNodes.rawData.qualityGradeCode |
|
|
|
if (hasCleaningInPlateOrCraftWay) { |
|
|
|
|
|
|
|
const hasCleaningInMainProcess = this.form1.tableData1.some( |
|
|
|
|
|
|
|
item => item.isMain === '1' && item.processName && item.processName.includes('清洗') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!hasCleaningInMainProcess) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">该零件镀种或工艺路线包含“清洗”,但主工序中未设置清洗工序。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 镀种信息中包含 Ct.p或者钝化,判断主工序是否包含 钝化 无则警告提示 |
|
|
|
|
|
|
|
const hasDotInPlate = |
|
|
|
|
|
|
|
this.partInfoData.plate && (this.partInfoData.plate.includes('Ct.p') || this.partInfoData.plate.includes('钝化')); |
|
|
|
|
|
|
|
if (hasDotInPlate) { |
|
|
|
|
|
|
|
const hasDotInMainProcess = this.form1.tableData1.some( |
|
|
|
|
|
|
|
item => item.isMain === '1' && item.processName && item.processName.includes('钝化') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!hasDotInMainProcess) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">该零件镀种包含Ct.p或钝化,但主工序中未设置钝化工序。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 镀种信息中包含 (Et.A(S) 且不包含 hd)和 (包含 硫酸阳极),/判断主工序是否包含 硫酸 无否则警告提示 |
|
|
|
|
|
|
|
const plate = this.partInfoData.plate || ''; |
|
|
|
|
|
|
|
const hasEtAS = plate.includes('Et.A(S)'); |
|
|
|
|
|
|
|
const hasNoHd = !plate.includes('hd'); |
|
|
|
|
|
|
|
const hasSulfuricAnodize = plate.includes('硫酸阳极'); |
|
|
|
|
|
|
|
if (hasEtAS && hasNoHd && hasSulfuricAnodize) { |
|
|
|
|
|
|
|
const hasSulfuricInMainProcess = this.form1.tableData1.some( |
|
|
|
|
|
|
|
item => item.isMain === '1' && item.processName && ( |
|
|
|
|
|
|
|
item.processName.includes('硫酸') || |
|
|
|
|
|
|
|
item.processName.includes('硫酸阳极') |
|
|
|
|
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
// this.treeNodes.rawData.qualityGradeName = qualityInfo.name; |
|
|
|
if (!hasSulfuricInMainProcess) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">镀种包含 Et.A(S)(不含hd)且含硫酸阳极,但主工序中未设置硫酸相关工序。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// 如需强制阻断保存,可取消下面注释: |
|
|
|
|
|
|
|
// return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 镀种信息包含 镀种信息中包含 (Et.A(S) 且包含 hd)和 (包含硫酸阳极),判断主工序是否包含 硬质,无则警告提示; |
|
|
|
|
|
|
|
const hasHds = plate.includes('hd'); |
|
|
|
|
|
|
|
if (hasEtAS && hasHds && hasSulfuricAnodize) { |
|
|
|
|
|
|
|
const hasHardAnodizeInMainProcess = this.form1.tableData1.some( |
|
|
|
|
|
|
|
item => item.isMain === '1' && item.processName && ( |
|
|
|
|
|
|
|
item.processName.includes('硬质') || |
|
|
|
|
|
|
|
item.processName.includes('硬质阳极') |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!hasHardAnodizeInMainProcess) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">镀种包含 Et.A(S)(含hd)且含硫酸阳极,但主工序中未设置硬质相关工序。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// 如需强制阻断保存,可取消下面注释: |
|
|
|
|
|
|
|
// return; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let query_ = { |
|
|
|
let query_ = { |
|
|
|
dsPart: this.partInfoData, //零件信息 |
|
|
|
dsPart: this.partInfoData, //零件信息 |
|
|
|
@ -1700,26 +1557,103 @@ export default { |
|
|
|
this.craftLoading = false; |
|
|
|
this.craftLoading = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.activeName == '2') { |
|
|
|
if (this.activeName == '2') { |
|
|
|
this.$refs.tableForm2.validate((isValid, invalidFields) => { |
|
|
|
this.$refs.tableForm2.validate((isValid, invalidFields) => { |
|
|
|
if (isValid) { |
|
|
|
if (isValid) { |
|
|
|
// 🔍 新增:校验是否包含“耐蚀性检测” |
|
|
|
console.log(90909090, this.partInfoData) |
|
|
|
const hasCorrosionTest = this.form2.tableData2.some( |
|
|
|
// 零件名称中 是否含有 印制板 判断项目中是否含有 可焊性检测 无则警告提示 |
|
|
|
item => |
|
|
|
const hasPrintingBoard = this.partInfoData.partName && this.partInfoData.partName.includes('印制板'); |
|
|
|
item.projectName?.includes('耐蚀性检测') || |
|
|
|
if (hasPrintingBoard) { |
|
|
|
(item.projectCode && |
|
|
|
const hasSolderabilityTest = this.form2.tableData2.some(item => |
|
|
|
this.projectOptions |
|
|
|
item.projectName && item.projectName.includes('可焊性') |
|
|
|
.find(p => p.id === item.projectCode) |
|
|
|
); |
|
|
|
?.name?.includes('耐蚀性检测')) |
|
|
|
if (!hasSolderabilityTest) { |
|
|
|
); |
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
// 如果父节点备注包含 'HTBY' 且未设置耐蚀性检测,则报错 |
|
|
|
message: '<strong style="font-size:22px">零件名称包含“印制板”,但检验项目中未设置“可焊性检测”。</strong>', |
|
|
|
if (this.parentData.rawData?.remarks?.includes('HTBY') && !hasCorrosionTest) { |
|
|
|
showClose: true, |
|
|
|
this.$message.error('备注包含 HTBY 时,检测项目必须包含耐蚀性检测!'); |
|
|
|
duration: 7000, |
|
|
|
return; |
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// 注意:此处仅为警告,不 return,允许用户继续保存(根据现有风格) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 镀种信息中带 nm或sb,判断检验项目是否存在 磁导率检测 无否则警告提示 |
|
|
|
|
|
|
|
const plate = (this.partInfoData.plate || '').toLowerCase(); |
|
|
|
|
|
|
|
if (plate.includes('nm') || plate.includes('sb')) { |
|
|
|
|
|
|
|
const hasPermeabilityTest = this.form2.tableData2.some(item => |
|
|
|
|
|
|
|
item.projectName && item.projectName.includes('磁导率') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!hasPermeabilityTest) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">镀种信息包含 nm 或 sb,但检验项目中未设置“磁导率检测”。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 镀种信息中 包含 干膜,判断项目是否存在 结合力检测,无否则警告提示 |
|
|
|
|
|
|
|
if (this.partInfoData.plate && this.partInfoData.plate.includes('干膜')) { |
|
|
|
|
|
|
|
const hasAdhesionTest = this.form2.tableData2.some(item => |
|
|
|
|
|
|
|
item.projectName && item.projectName.includes('结合力') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!hasAdhesionTest) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">镀种信息包含“干膜”,但检验项目中未设置“结合力检测”。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 镀种信息中包含 (Et.A(S) 且不包含 hd)和 (包含 硫酸阳极),判断检验项目是否存在 封孔性检测 无否则警告提示 |
|
|
|
|
|
|
|
const plateStr2 = this.partInfoData.plate || ''; |
|
|
|
|
|
|
|
const hasEtAS2 = plateStr2.includes('Et.A(S)'); |
|
|
|
|
|
|
|
const hasNoHd2 = !plateStr2.includes('hd'); |
|
|
|
|
|
|
|
const hasSulfuricAnodize2 = plateStr2.includes('硫酸阳极'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hasEtAS2 && hasNoHd2 && hasSulfuricAnodize2) { |
|
|
|
|
|
|
|
const hasSealingTest2 = this.form2.tableData2.some(item => |
|
|
|
|
|
|
|
item.projectName && item.projectName.includes('封孔') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!hasSealingTest2) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">镀种包含 Et.A(S)(不含hd)且含硫酸阳极,但检验项目中未设置“封孔性检测”。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 镀种信息包含 镀种信息中包含 (Et.A(S) 且包含 hd)和 (包含硫酸阳极);若同时镀种信息中包含C1,检测项目是否存在 封孔性检测,无则警告提示 |
|
|
|
|
|
|
|
const plateStr = this.partInfoData.plate || ''; |
|
|
|
|
|
|
|
const hasEtAS = plateStr.includes('Et.A(S)'); |
|
|
|
|
|
|
|
const hasHd = plateStr.includes('hd'); |
|
|
|
|
|
|
|
const hasSulfuricAnodize = plateStr.includes('硫酸阳极'); |
|
|
|
|
|
|
|
const hasC1 = plateStr.includes('C1'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hasEtAS && hasHd && hasSulfuricAnodize && hasC1) { |
|
|
|
|
|
|
|
const hasSealingTest = this.form2.tableData2.some(item => |
|
|
|
|
|
|
|
item.projectName && item.projectName.includes('封孔') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!hasSealingTest) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
message: '<strong style="font-size:22px">镀种包含 Et.A(S)(含hd)、硫酸阳极及C1,但检验项目中未设置“封孔性检测”。</strong>', |
|
|
|
|
|
|
|
showClose: true, |
|
|
|
|
|
|
|
duration: 7000, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.craftLoading = true; |
|
|
|
this.craftLoading = true; |
|
|
|
let query_ = { |
|
|
|
let query_ = { |
|
|
|
processEntity: this.treeNodes.rawData.processInfo, //工序 |
|
|
|
processEntity: this.treeNodes.rawData.processInfo, //工序 |
|
|
|
@ -1992,10 +1926,12 @@ export default { |
|
|
|
// background-color: #f5f7fa; |
|
|
|
// background-color: #f5f7fa; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.el-tree-node__label { |
|
|
|
.el-tree-node__label { |
|
|
|
font-size: 14px; |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-tree-node.is-current > .el-tree-node__content) { |
|
|
|
:deep(.el-tree-node.is-current > .el-tree-node__content) { |
|
|
|
background-color: rgba(40, 76, 135, 0.9) !important; |
|
|
|
background-color: rgba(40, 76, 135, 0.9) !important; |
|
|
|
|
|
|
|
|
|
|
|
@ -2003,6 +1939,7 @@ export default { |
|
|
|
color: #fff; |
|
|
|
color: #fff; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-table__header th.el-table__cell) { |
|
|
|
:deep(.el-table__header th.el-table__cell) { |
|
|
|
height: 40px !important; |
|
|
|
height: 40px !important; |
|
|
|
min-height: 40px !important; |
|
|
|
min-height: 40px !important; |
|
|
|
@ -2054,8 +1991,10 @@ export default { |
|
|
|
padding: 6px 12px; |
|
|
|
padding: 6px 12px; |
|
|
|
margin: 0; |
|
|
|
margin: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-table thead) { |
|
|
|
:deep(.el-table thead) { |
|
|
|
height: 36px !important; /* 设置你想要的高度 */ |
|
|
|
height: 36px !important; |
|
|
|
|
|
|
|
/* 设置你想要的高度 */ |
|
|
|
line-height: 36px !important; |
|
|
|
line-height: 36px !important; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|
|