|
|
@@ -124,7 +124,14 @@
|
|
|
:columns="columns"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-if="!isView" v-slot:toolbar>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ !isView &&
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ v-slot:toolbar
|
|
|
+ >
|
|
|
<el-button
|
|
|
size="small"
|
|
|
icon="el-icon-plus"
|
|
|
@@ -215,6 +222,10 @@
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
|
<el-popconfirm
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
class="ele-action"
|
|
|
title="确定要删除当前参数吗?"
|
|
|
@confirm="remove(row, '工艺')"
|
|
|
@@ -235,7 +246,7 @@
|
|
|
<el-tab-pane label="质检项参数" name="质检项参数">
|
|
|
<term
|
|
|
:qualityParam="qualityParam"
|
|
|
- :isView="isView"
|
|
|
+ :isView="isReadonly"
|
|
|
:isQualityInspection="false"
|
|
|
ref="qualityParamRef"
|
|
|
></term>
|
|
|
@@ -563,7 +574,6 @@
|
|
|
v-else
|
|
|
v-model="row.count"
|
|
|
placeholder="请输入"
|
|
|
- style="width: 90px"
|
|
|
@input="handleInput(row)"
|
|
|
:disabled="
|
|
|
attributeData.approvalStatus == 1 ||
|
|
|
@@ -572,6 +582,21 @@
|
|
|
></el-input>
|
|
|
</template>
|
|
|
|
|
|
+ <template v-slot:weight="{ row }">
|
|
|
+ <div v-if="isView">{{ row.weight }}</div>
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="row.weight"
|
|
|
+ placeholder="请输入"
|
|
|
+ oninput="value = value.replace(/[^\d.]/g, '')"
|
|
|
+ :disabled="
|
|
|
+ attributeData.approvalStatus == 1 ||
|
|
|
+ attributeData.approvalStatus == 2 ||
|
|
|
+ !row.weightUnit
|
|
|
+ "
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-slot:categoryName="{ row, $index }">
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
@@ -631,11 +656,24 @@
|
|
|
:immediate="true"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-if="!isView" v-slot:toolbar>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ !isView &&
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ v-slot:toolbar
|
|
|
+ >
|
|
|
<el-button type="primary" @click="add">添加</el-button>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <el-link type="danger" @click="handleDel(row, $index)"
|
|
|
+ <el-link
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ type="danger"
|
|
|
+ @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
>
|
|
|
</template>
|
|
|
@@ -651,11 +689,24 @@
|
|
|
:immediate="true"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-if="!isView" v-slot:toolbar>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ !isView &&
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ v-slot:toolbar
|
|
|
+ >
|
|
|
<el-button type="primary" @click="add">添加</el-button>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <el-link type="primary" @click="handleDel(row, $index)"
|
|
|
+ <el-link
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ type="primary"
|
|
|
+ @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
>
|
|
|
</template>
|
|
|
@@ -743,7 +794,13 @@
|
|
|
row-key="id"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-slot:toolbar>
|
|
|
+ <template
|
|
|
+ v-slot:toolbar
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ >
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@@ -754,7 +811,13 @@
|
|
|
>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <el-link type="primary" @click="handleDel(row, $index)"
|
|
|
+ <el-link
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ type="primary"
|
|
|
+ @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
>
|
|
|
</template>
|
|
|
@@ -768,11 +831,24 @@
|
|
|
:need-page="false"
|
|
|
:immediate="true"
|
|
|
>
|
|
|
- <template v-if="!isView" v-slot:toolbar>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ !isView &&
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ v-slot:toolbar
|
|
|
+ >
|
|
|
<el-button type="primary" @click="addFile">添加</el-button>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <el-link type="primary" @click="handleDel(row, $index)"
|
|
|
+ <el-link
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ type="primary"
|
|
|
+ @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
>
|
|
|
<el-link type="primary" @click="fileDetails(row)">详情</el-link>
|
|
|
@@ -789,11 +865,24 @@
|
|
|
:immediate="true"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-if="!isView" v-slot:toolbar>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ !isView &&
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ v-slot:toolbar
|
|
|
+ >
|
|
|
<el-button type="primary" @click="add">添加</el-button>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <el-link type="danger" @click="handleDel(row, $index)"
|
|
|
+ <el-link
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ type="danger"
|
|
|
+ @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
>
|
|
|
</template>
|
|
|
@@ -805,13 +894,14 @@
|
|
|
:produce-task-name="rowData.name"
|
|
|
:produce-task-code="rowData.code"
|
|
|
:bom-category-id="resourceBomId"
|
|
|
+ :is-view="isReadonly"
|
|
|
ref="userSettingMatterProcessRef"
|
|
|
></userSettingMatterProcess>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="首件两检" name="首件两检">
|
|
|
<term
|
|
|
:qualityParam="firstArticleDualInspectionParam"
|
|
|
- :isView="isView"
|
|
|
+ :isView="isReadonly"
|
|
|
ref="firstArticleDualInspectionParamRef"
|
|
|
></term>
|
|
|
</el-tab-pane>
|
|
|
@@ -824,13 +914,26 @@
|
|
|
:immediate="true"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-if="!isView" v-slot:toolbar>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ !isView &&
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ v-slot:toolbar
|
|
|
+ >
|
|
|
<el-button type="primary" @click="addFile('ncCodeList')"
|
|
|
>添加</el-button
|
|
|
>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <el-link type="primary" @click="handleDel(row, $index)"
|
|
|
+ <el-link
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ type="primary"
|
|
|
+ @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
>
|
|
|
<el-link type="primary" @click="fileDetails(row, 'nc')"
|
|
|
@@ -871,15 +974,25 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- v-if="!isView"
|
|
|
+ v-if="
|
|
|
+ !isView &&
|
|
|
+ attributeData.approvalStatus != 1 &&
|
|
|
+ attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
@click="save('save')"
|
|
|
>
|
|
|
保存</el-button
|
|
|
>
|
|
|
|
|
|
- <el-button type="primary" size="small" @click="save('close')">{{
|
|
|
- isView ? '确定' : '保存并关闭'
|
|
|
- }}</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ v-if="
|
|
|
+ attributeData.approvalStatus != 1 && attributeData.approvalStatus != 2
|
|
|
+ "
|
|
|
+ @click="save('close')"
|
|
|
+ >{{ isView ? '确定' : '保存并关闭' }}</el-button
|
|
|
+ >
|
|
|
<el-button size="small" @click="handleClose">关闭</el-button>
|
|
|
</div>
|
|
|
</ele-modal>
|
|
|
@@ -1014,19 +1127,32 @@
|
|
|
{
|
|
|
label: '数量',
|
|
|
slot: 'count',
|
|
|
- action: 'count'
|
|
|
+ action: 'count',
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
label: '单位',
|
|
|
slot: 'unit',
|
|
|
action: 'unit'
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '重量',
|
|
|
+ prop: 'weight',
|
|
|
+ slot: 'weight',
|
|
|
+ action: 'weight',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '重量单位',
|
|
|
+ prop: 'weightUnit',
|
|
|
+ width: 80
|
|
|
+ },
|
|
|
|
|
|
{
|
|
|
label: '附件',
|
|
|
slot: 'bomArtFiles',
|
|
|
action: 'bomArtFiles',
|
|
|
- minWidth: 150
|
|
|
+ minWidth: 100
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -1366,6 +1492,15 @@
|
|
|
this.getDictList('time_unit');
|
|
|
this.getDicTUnitList('measuring_uint');
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ isReadonly() {
|
|
|
+ return (
|
|
|
+ this.isView ||
|
|
|
+ this.attributeData.approvalStatus == 1 ||
|
|
|
+ this.attributeData.approvalStatus == 2
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
addFile(fileListType) {
|
|
|
this.fileShow = true;
|
|
|
@@ -1642,8 +1777,12 @@
|
|
|
remark: '',
|
|
|
specification: item.specification,
|
|
|
rootCategoryLevelId: item.categoryLevelPathIdParent,
|
|
|
- extInfo: item.extInfo
|
|
|
+ extInfo: item.extInfo,
|
|
|
+ weightUnit: item.weightUnit,
|
|
|
+ weight: item.netWeight
|
|
|
});
|
|
|
+
|
|
|
+ console.log('array', array);
|
|
|
});
|
|
|
|
|
|
let _arr =
|