|
|
@@ -157,123 +157,8 @@
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="质检参数" name="质检参数">
|
|
|
- <ele-pro-table
|
|
|
- ref="qualityTable"
|
|
|
- :datasource="datasource"
|
|
|
- :immediate="true"
|
|
|
- :need-page="false"
|
|
|
- :columns="columns"
|
|
|
- >
|
|
|
- <!-- 表头工具栏 -->
|
|
|
- <template v-if="!isView" v-slot:toolbar>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- icon="el-icon-plus"
|
|
|
- class="ele-btn-icon"
|
|
|
- type="primary"
|
|
|
- @click.native="openParam('质检')"
|
|
|
- >添加参数</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:sort="{ row }">
|
|
|
- <div v-if="isView">{{ row.sort }}</div>
|
|
|
- <el-input v-else v-model="row.sort"></el-input>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 默认值 -->
|
|
|
- <template v-slot:defaultValue="{ row }">
|
|
|
- <div v-if="isView">
|
|
|
- {{ row.defaultValue }}
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <el-input
|
|
|
- v-if="
|
|
|
- row.textType == 1 ||
|
|
|
- row.textType == 4 ||
|
|
|
- row.textType == 3 ||
|
|
|
- row.textType == 5
|
|
|
- "
|
|
|
- v-model="row.defaultValue"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- <el-select
|
|
|
- v-if="row.textType == 2"
|
|
|
- v-model="row.defaultValue"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option label="TRUE" :value="'TRUE'" />
|
|
|
- <el-option label="FALSE" :value="'FALSE'" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 上限 -->
|
|
|
- <template v-slot:maxValue="{ row }">
|
|
|
- <div v-if="isView">
|
|
|
- {{ row.maxValue }}
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <el-input
|
|
|
- v-if="row.textType == 3"
|
|
|
- v-model="row.maxValue"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <!-- 下限 -->
|
|
|
- <template v-slot:minValue="{ row }">
|
|
|
- <div v-if="isView">
|
|
|
- {{ row.minValue }}
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <el-input
|
|
|
- v-if="row.textType == 3"
|
|
|
- v-model="row.minValue"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 单位 -->
|
|
|
- <template v-slot:unitName="{ row }">
|
|
|
- <div v-if="isView">
|
|
|
- {{ row.unitName }}
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <DictSelection
|
|
|
- v-if="row.textType != 2 && row.textType != 5"
|
|
|
- dictName="工艺参数单位"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- v-model="row.unitName"
|
|
|
- >
|
|
|
- </DictSelection>
|
|
|
-
|
|
|
- <span v-if="row.textType == 5"> h(小时)</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 操作列 -->
|
|
|
- <template v-slot:action="{ row }">
|
|
|
- <el-popconfirm
|
|
|
- class="ele-action"
|
|
|
- title="确定要删除当前参数吗?"
|
|
|
- @confirm="remove(row, '工艺')"
|
|
|
- >
|
|
|
- <template v-slot:reference>
|
|
|
- <el-link
|
|
|
- type="danger"
|
|
|
- :underline="false"
|
|
|
- icon="el-icon-delete"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </el-link>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
- </template>
|
|
|
- </ele-pro-table>
|
|
|
+ <el-tab-pane label="质检项参数" name="质检项参数">
|
|
|
+ <term></term>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="生产节拍" name="生产节拍">
|
|
|
<el-form label-width="100px" ref="form" :model="beatParam">
|
|
|
@@ -619,6 +504,27 @@
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane label="关键设备" name="关键设备">
|
|
|
+ <ele-pro-table
|
|
|
+ ref="deviceTabRef"
|
|
|
+ :columns="standardCol"
|
|
|
+ :datasource="datasource"
|
|
|
+ :need-page="false"
|
|
|
+ :immediate="true"
|
|
|
+ >
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
+ <template v-if="!isView" 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
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
<el-tab-pane label="制造资源" name="制造资源">
|
|
|
<ele-pro-table
|
|
|
ref="resourceTable"
|
|
|
@@ -733,6 +639,9 @@
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="替代料" name="替代料">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<ele-pro-table
|
|
|
ref="replaceMaterialTable"
|
|
|
:columns="columns1"
|
|
|
@@ -743,7 +652,16 @@
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-if="!isView" v-slot:toolbar>
|
|
|
<el-button type="primary" @click="add">添加</el-button>
|
|
|
+ <div class="toolbar_box">
|
|
|
+ <div
|
|
|
+ ><span>基本数量</span>
|
|
|
+ <el-input placeholder="请输入" v-model.number="baseCount2">
|
|
|
+ </el-input>
|
|
|
+ <DictSelection dictName="计量单位" v-model="baseCountUnit2"
|
|
|
+ /></div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
+
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
<el-link type="primary" @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
@@ -969,102 +887,23 @@
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="" name="工艺文件">
|
|
|
+ <el-tab-pane label="标准产出" name="标准产出">
|
|
|
<ele-pro-table
|
|
|
- ref="fileTable"
|
|
|
- :columns="jobColumns1"
|
|
|
+ ref="standard"
|
|
|
+ :columns="standardCol"
|
|
|
:datasource="datasource"
|
|
|
:need-page="false"
|
|
|
:immediate="true"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-if="!isView" v-slot:toolbar>
|
|
|
- <el-button type="primary" @click="addFile">添加</el-button>
|
|
|
+ <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 type="danger" @click="handleDel(row, $index)"
|
|
|
>删除</el-link
|
|
|
>
|
|
|
</template>
|
|
|
- <template v-slot:type="{ row }">
|
|
|
- <div v-if="isView">{{ row.type }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.type"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:code="{ row }">
|
|
|
- <div v-if="isView">{{ row.code }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.code"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:versions="{ row }">
|
|
|
- <div v-if="isView">{{ row.versions }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.versions"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:status="{ row }">
|
|
|
- <div v-if="isView">{{
|
|
|
- statusOption.filter((item) => item.value == row.status)[0].label
|
|
|
- }}</div>
|
|
|
- <div v-else>
|
|
|
- <template>
|
|
|
- <el-select v-model="row.status" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in statusOption"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:path="{ row }">
|
|
|
- <div v-if="isView">附件</div>
|
|
|
- <div v-else
|
|
|
- ><div class="downLoad">
|
|
|
- <fileUpload
|
|
|
- v-model="jobFiledList"
|
|
|
- :show-file-list="false"
|
|
|
- module="main"
|
|
|
- @input="uploadedJobSuccess($event, row)"
|
|
|
- :showLib="false"
|
|
|
- :limit="1"
|
|
|
- />
|
|
|
- <div v-if="row.path">
|
|
|
- <el-button
|
|
|
- style="margin-left: 10px"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="downloadFile(row.path)"
|
|
|
- >下载</el-button
|
|
|
- >
|
|
|
- </div></div
|
|
|
- >
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:remark="{ row }">
|
|
|
- <div v-if="isView">{{ row.remark }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.remark"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -1078,6 +917,11 @@
|
|
|
@selection="addProductList"
|
|
|
></ProductModalMultiple>
|
|
|
|
|
|
+ <standardOutput
|
|
|
+ ref="standardOutputRefs"
|
|
|
+ @selection="chooseStandardList"
|
|
|
+ ></standardOutput>
|
|
|
+
|
|
|
<div class="btns">
|
|
|
<el-button type="primary" size="small" @click="save">{{
|
|
|
isView ? '确定' : '保存'
|
|
|
@@ -1098,6 +942,8 @@
|
|
|
import ProductModalMultiple from './ProductModalMultiple.vue';
|
|
|
import userSearch from './user-search.vue';
|
|
|
import jobDialog from './jobDialog.vue';
|
|
|
+ import standardOutput from './standardOutput.vue';
|
|
|
+ import term from '../qualityTesting/term';
|
|
|
export default {
|
|
|
components: {
|
|
|
userSearch,
|
|
|
@@ -1105,13 +951,17 @@
|
|
|
fileUpload,
|
|
|
ProductModal,
|
|
|
jobDialog,
|
|
|
- ProductModalMultiple
|
|
|
+ ProductModalMultiple,
|
|
|
+ standardOutput,
|
|
|
+ term
|
|
|
},
|
|
|
mixins: [dictMixins],
|
|
|
data() {
|
|
|
return {
|
|
|
baseCount: '',
|
|
|
baseCountUnit: '',
|
|
|
+ baseCount2: '',
|
|
|
+ baseCountUnit2: '',
|
|
|
isView: false,
|
|
|
filedList: [],
|
|
|
jobFiledList: [],
|
|
|
@@ -1406,6 +1256,50 @@
|
|
|
}
|
|
|
],
|
|
|
|
|
|
+ standardCol: [
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'brandNum',
|
|
|
+ label: '牌号'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'specification',
|
|
|
+ label: '规格',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 90
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
rowData: {},
|
|
|
treeData: {},
|
|
|
currentIndex: 0,
|
|
|
@@ -1522,7 +1416,12 @@
|
|
|
type = 'aptitudeParam';
|
|
|
} else if (this.activeName === '工艺文件') {
|
|
|
type = 'fileParam';
|
|
|
+ } else if (this.activeName === '标准产出') {
|
|
|
+ type = 'standardOutput';
|
|
|
+ } else if (this.activeName === '关键设备') {
|
|
|
+ type = 'standardDevice';
|
|
|
}
|
|
|
+
|
|
|
this.tableData.taskParam[this.currentIndex][type].splice(index, 1);
|
|
|
},
|
|
|
addProductList(list) {
|
|
|
@@ -1600,6 +1499,12 @@
|
|
|
if (this.activeName === '材料定额') {
|
|
|
this.$refs.productMultipleRefs.open(1);
|
|
|
return;
|
|
|
+ } else if (this.activeName === '标准产出') {
|
|
|
+ this.$refs.standardOutputRefs.open(9);
|
|
|
+ return;
|
|
|
+ } else if (this.activeName === '关键设备') {
|
|
|
+ this.$refs.standardOutputRefs.open(4);
|
|
|
+ return;
|
|
|
} else if (this.activeName === '制造资源') {
|
|
|
type = 'resource';
|
|
|
} else if (this.activeName === '替代料') {
|
|
|
@@ -1645,11 +1550,6 @@
|
|
|
this.$refs.table.setData(
|
|
|
this.tableData.taskParam[this.currentIndex].produceList || []
|
|
|
);
|
|
|
- } else if (this.activeName === '质检参数') {
|
|
|
- // 质检参数
|
|
|
- this.$refs.qualityTable.setData(
|
|
|
- this.tableData.taskParam[this.currentIndex].qualityParam || []
|
|
|
- );
|
|
|
} else if (this.activeName === '生产节拍') {
|
|
|
console.log(this.tableData.taskParam[this.currentIndex].beatParam);
|
|
|
this.beatParam =
|
|
|
@@ -1695,6 +1595,14 @@
|
|
|
this.tableData.taskParam[this.currentIndex].fileParam
|
|
|
);
|
|
|
}
|
|
|
+ } else if (this.activeName === '标准产出') {
|
|
|
+ this.$refs.standard.setData(
|
|
|
+ this.tableData.taskParam[this.currentIndex].standardOutput || []
|
|
|
+ );
|
|
|
+ } else if (this.activeName === '关键设备') {
|
|
|
+ this.$refs.deviceTabRef.setData(
|
|
|
+ this.tableData.taskParam[this.currentIndex].standardDevice || []
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
openParam(type) {
|
|
|
@@ -1710,16 +1618,38 @@
|
|
|
let dom = null;
|
|
|
if (this.activeName === '工艺参数') {
|
|
|
dom = this.$refs.table;
|
|
|
- } else if (this.activeName === '质检参数') {
|
|
|
- dom = this.$refs.qualityTable;
|
|
|
}
|
|
|
dom.setData([...data, ...dom.getData()]);
|
|
|
this.$set(
|
|
|
this.tableData.taskParam[this.currentIndex],
|
|
|
- this.activeName === '工艺参数' ? 'produceList' : 'qualityParam',
|
|
|
+ this.activeName === '工艺参数' ? 'produceList' : '',
|
|
|
dom.getData()
|
|
|
);
|
|
|
},
|
|
|
+
|
|
|
+ chooseStandardList(type, data) {
|
|
|
+ let dom = null;
|
|
|
+
|
|
|
+ if (type == 9) {
|
|
|
+ dom = this.$refs.standard;
|
|
|
+ dom.setData([data[0]]);
|
|
|
+
|
|
|
+ this.$set(
|
|
|
+ this.tableData.taskParam[this.currentIndex],
|
|
|
+ 'standardOutput',
|
|
|
+ dom.getData()
|
|
|
+ );
|
|
|
+ } else if (type == 4) {
|
|
|
+ dom = this.$refs.deviceTabRef;
|
|
|
+ dom.setData([data[0]]);
|
|
|
+
|
|
|
+ this.$set(
|
|
|
+ this.tableData.taskParam[this.currentIndex],
|
|
|
+ 'standardDevice',
|
|
|
+ dom.getData()
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
remove(row, type) {
|
|
|
let dom = null;
|
|
|
if (type === '工艺') {
|
|
|
@@ -1769,6 +1699,13 @@
|
|
|
(item) => item.id === rowData.id
|
|
|
);
|
|
|
this.activeName = '工艺参数';
|
|
|
+
|
|
|
+ this.baseCount = rowData.baseCount;
|
|
|
+ this.baseCountUnit = rowData.baseCountUnit;
|
|
|
+
|
|
|
+ this.baseCount2 = rowData.baseCount2;
|
|
|
+ this.baseCountUnit2 = rowData.baseCountUnit2;
|
|
|
+
|
|
|
this.visible = true;
|
|
|
setTimeout(() => {
|
|
|
console.log(this.$refs);
|
|
|
@@ -1807,6 +1744,12 @@
|
|
|
this.baseCount;
|
|
|
this.tableData.taskParam[this.currentIndex].baseCountUnit =
|
|
|
this.baseCountUnit;
|
|
|
+
|
|
|
+ this.tableData.taskParam[this.currentIndex].baseCount2 =
|
|
|
+ this.baseCount2;
|
|
|
+ this.tableData.taskParam[this.currentIndex].baseCountUnit2 =
|
|
|
+ this.baseCountUnit2;
|
|
|
+
|
|
|
workingProcedureUpdate({
|
|
|
id: this.tableData.id,
|
|
|
categoryId: this.treeData.categoryId,
|