|
@@ -10,7 +10,237 @@
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
:close-on-press-escape="false"
|
|
|
>
|
|
>
|
|
|
- <el-table :data="tableData" :default-expand-all="true">
|
|
|
|
|
|
|
+ <div class="two-layout">
|
|
|
|
|
+ <el-row :gutter="10" class="full-row">
|
|
|
|
|
+ <el-col :span="12" class="full-col">
|
|
|
|
|
+ <div class="pane">
|
|
|
|
|
+ <div class="pane-title">质检</div>
|
|
|
|
|
+ <div class="table-wrapper">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ :default-expand-all="true"
|
|
|
|
|
+ height="calc(80vh - 120px)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column type="expand">
|
|
|
|
|
+ <template slot-scope="props">
|
|
|
|
|
+ <div style="padding: 10px">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="props.row.qualitySampleTemplateList"
|
|
|
|
|
+ border
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检方案编码"
|
|
|
|
|
+ prop="qualitySchemeTemplateCode"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span
|
|
|
|
|
+ :class="
|
|
|
|
|
+ scope.row.qualityResults == 2 ? 'warn' : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ scope.row.qualitySchemeTemplateCode }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检方案名称"
|
|
|
|
|
+ prop="qualitySchemeTemplateName"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span
|
|
|
|
|
+ :class="
|
|
|
|
|
+ scope.row.qualityResults === 2 ? 'warn' : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ scope.row.qualitySchemeTemplateName }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检类型"
|
|
|
|
|
+ prop="categoryLevelClassName"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span
|
|
|
|
|
+ :class="
|
|
|
|
|
+ scope.row.qualityResults === 2 ? 'warn' : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ scope.row.categoryLevelClassName }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检项编码"
|
|
|
|
|
+ prop="inspectionCode"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span
|
|
|
|
|
+ :class="
|
|
|
|
|
+ scope.row.qualityResults === 2 ? 'warn' : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ scope.row.inspectionCode }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检项名称"
|
|
|
|
|
+ prop="inspectionName"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span
|
|
|
|
|
+ :class="
|
|
|
|
|
+ scope.row.qualityResults === 2 ? 'warn' : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ scope.row.inspectionName }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="工艺参数"
|
|
|
|
|
+ prop="defaultValue"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="display: flex; justify-content: center"
|
|
|
|
|
+ :class="
|
|
|
|
|
+ scope.row.qualityResults === 2 ? 'warn' : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ <span>{{ scope.row.symbol }}</span>
|
|
|
|
|
+ <span v-if="scope.row.textType == 3">
|
|
|
|
|
+ {{ scope.row.minValue }}-{{
|
|
|
|
|
+ scope.row.maxValue
|
|
|
|
|
+ }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+
|
|
|
|
|
+ <span v-else>
|
|
|
|
|
+ <span>{{ scope.row.defaultValue }}</span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+
|
|
|
|
|
+ {{ scope.row.unitName }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检工具"
|
|
|
|
|
+ prop=""
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <toolButtom
|
|
|
|
|
+ v-model="scope.row.useTools"
|
|
|
|
|
+ :type="type"
|
|
|
|
|
+ :sList="scope.row.toolList"
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检内容"
|
|
|
|
|
+ prop="qualityResultContent"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ fixed="right"
|
|
|
|
|
+ width="360"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ :class="
|
|
|
|
|
+ scope.row.qualityResults === 2 ? 'warn' : ''
|
|
|
|
|
+ "
|
|
|
|
|
+ v-model="scope.row.qualityResultContent"
|
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
|
+ :disabled="type == 'detail'"
|
|
|
|
|
+ @input="
|
|
|
|
|
+ handleInput(
|
|
|
|
|
+ scope.row,
|
|
|
|
|
+ scope.row.qualityResultContent
|
|
|
|
|
+ )
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot="append" v-if="scope.row.unitName">
|
|
|
|
|
+ {{ scope.row.unitName }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="质检结果"
|
|
|
|
|
+ prop="qualityResults"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ fixed="right"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="scope.row.qualityResults"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ @change="qualityResultsListChange"
|
|
|
|
|
+ :disabled="type == 'detail'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in qualityResultsList"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <template v-for="column in tableColumns">
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ :label="column.label"
|
|
|
|
|
+ :prop="column.prop"
|
|
|
|
|
+ :fixed="column.fixed"
|
|
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
|
|
+ :width="column.width"
|
|
|
|
|
+ :align="column.align"
|
|
|
|
|
+ :formatter="column.formatter"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button @click="handleClose">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="handleConfirm">
|
|
|
|
|
+ 确认
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+
|
|
|
|
|
+ <el-col :span="12" class="full-col">
|
|
|
|
|
+ <div class="pane">
|
|
|
|
|
+ <div class="pane-title">工艺文件</div>
|
|
|
|
|
+
|
|
|
|
|
+ <wokePopupList ref="wokePopupListRef"></wokePopupList>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <el-table :data="tableData" :default-expand-all="true">
|
|
|
<el-table-column type="expand">
|
|
<el-table-column type="expand">
|
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
|
<div style="padding: 10px">
|
|
<div style="padding: 10px">
|
|
@@ -22,7 +252,7 @@
|
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
|
|
+ <span :class="scope.row.qualityResults == 2 ? 'warn' : ''">
|
|
|
{{ scope.row.qualitySchemeTemplateCode }}
|
|
{{ scope.row.qualitySchemeTemplateCode }}
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -82,9 +312,6 @@
|
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <!-- <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
- {{ scope.row.defaultValue }}
|
|
|
|
|
- </span> -->
|
|
|
|
|
<div
|
|
<div
|
|
|
style="display: flex; justify-content: center"
|
|
style="display: flex; justify-content: center"
|
|
|
:class="scope.row.qualityResults === 2 ? 'warn' : ''"
|
|
:class="scope.row.qualityResults === 2 ? 'warn' : ''"
|
|
@@ -112,7 +339,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <!-- @blur="(e) => inputResultContent(e, scope.row)" -->
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="质检内容"
|
|
label="质检内容"
|
|
|
prop="qualityResultContent"
|
|
prop="qualityResultContent"
|
|
@@ -174,49 +400,25 @@
|
|
|
:align="column.align"
|
|
:align="column.align"
|
|
|
:formatter="column.formatter"
|
|
:formatter="column.formatter"
|
|
|
>
|
|
>
|
|
|
- <!-- <template slot-scope="scope" v-if="column.slot=='qualityResults'">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="scope.row.qualityResults"
|
|
|
|
|
- placeholder="请选择"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- :disabled="type == 'detail'"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in qualityResultsList"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </template> -->
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</template>
|
|
</template>
|
|
|
- <!-- <el-table-column label="操作" align="center" width="80">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-link
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- @click="handleDispose(scope.$index, scope.row, 'dispose')"
|
|
|
|
|
- >
|
|
|
|
|
- 处置
|
|
|
|
|
- </el-link>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column> -->
|
|
|
|
|
- </el-table>
|
|
|
|
|
- <template v-slot:footer v-if="type == 'report'">
|
|
|
|
|
|
|
+ </el-table> -->
|
|
|
|
|
+ <!-- <template v-slot:footer v-if="type == 'report'">
|
|
|
<el-button @click="handleClose">取消</el-button>
|
|
<el-button @click="handleClose">取消</el-button>
|
|
|
<el-button type="primary" @click="handleConfirm"> 确认 </el-button>
|
|
<el-button type="primary" @click="handleConfirm"> 确认 </el-button>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import index from 'ele-admin/lib/ele-avatar-list';
|
|
import index from 'ele-admin/lib/ele-avatar-list';
|
|
|
import toolButtom from './toolButtom.vue';
|
|
import toolButtom from './toolButtom.vue';
|
|
|
|
|
+ import wokePopupList from '@/components/workList/newWokePopupList.vue';
|
|
|
|
|
+ import { parameterGetByCode } from '@/api/system/dictionary-data';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
- toolButtom
|
|
|
|
|
|
|
+ toolButtom,
|
|
|
|
|
+ wokePopupList
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -315,12 +517,10 @@
|
|
|
|
|
|
|
|
created() {},
|
|
created() {},
|
|
|
methods: {
|
|
methods: {
|
|
|
- async openDia(index, row, type, list, isStatus, sList) {
|
|
|
|
|
|
|
+ async openDia(index, row, type, list, isStatus, sList, formData) {
|
|
|
this.tableData = [];
|
|
this.tableData = [];
|
|
|
this.rowIndex = index;
|
|
this.rowIndex = index;
|
|
|
this.type = type;
|
|
this.type = type;
|
|
|
- // console.log(list, 'lklllllllllllllllllkkkkkkkkkkkkkkkkkkkkk', list[0].qualityResults);
|
|
|
|
|
- //如果质检项qualitySampleTemplateList只有一条数据且质检结果是让步接收
|
|
|
|
|
if (list[0].qualitySampleTemplateList.length == 1) {
|
|
if (list[0].qualitySampleTemplateList.length == 1) {
|
|
|
for (let i = 0; i < list[0].qualitySampleTemplateList.length; i++) {
|
|
for (let i = 0; i < list[0].qualitySampleTemplateList.length; i++) {
|
|
|
list[0].qualitySampleTemplateList[i].qualityResults = list[0]
|
|
list[0].qualitySampleTemplateList[i].qualityResults = list[0]
|
|
@@ -337,10 +537,26 @@
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
this.tableData = JSON.parse(JSON.stringify(list));
|
|
this.tableData = JSON.parse(JSON.stringify(list));
|
|
|
- console.log(this.tableData, '33333333333333333');
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.getFileParam(formData);
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ async getFileParam(form) {
|
|
|
|
|
+ const res = await parameterGetByCode({
|
|
|
|
|
+ code: 'mes_craft_file_by_category_code'
|
|
|
|
|
+ });
|
|
|
|
|
+ const byCategory = res?.value === '1';
|
|
|
|
|
+
|
|
|
|
|
+ if (byCategory) {
|
|
|
|
|
+ this.$refs.wokePopupListRef.openTwo(form, 2);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$refs.wokePopupListRef.open(
|
|
|
|
|
+ form.fileParam.map((item) => item.id),
|
|
|
|
|
+ 1
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
qualityResultsListChange() {
|
|
qualityResultsListChange() {
|
|
|
this.tableData.forEach((item, index) => {
|
|
this.tableData.forEach((item, index) => {
|
|
|
this.$set(
|
|
this.$set(
|
|
@@ -360,7 +576,6 @@
|
|
|
return getQualityValue;
|
|
return getQualityValue;
|
|
|
},
|
|
},
|
|
|
inputResultContent(e, row) {
|
|
inputResultContent(e, row) {
|
|
|
- console.log(row, 'row row row');
|
|
|
|
|
if (row.textType == '1') {
|
|
if (row.textType == '1') {
|
|
|
if (!row.symbol) {
|
|
if (!row.symbol) {
|
|
|
if (row.qualityResultContent != row.defaultValue) {
|
|
if (row.qualityResultContent != row.defaultValue) {
|
|
@@ -529,4 +744,61 @@
|
|
|
color: red;
|
|
color: red;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .two-layout {
|
|
|
|
|
+ height: 80vh;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .full-row {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .full-col {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .pane {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ padding: 10px;
|
|
|
|
|
+
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 表格父级 */
|
|
|
|
|
+ .table-wrapper {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ overflow: auto; //
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .pane-title {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: #03541c;
|
|
|
|
|
+ padding-bottom: 10px;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ border-bottom: 1px solid #ebeef5;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ ::v-deep .el-table__body-wrapper {
|
|
|
|
|
+ overflow-y: auto !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dialog-footer {
|
|
|
|
|
+ padding: 10px 0;
|
|
|
|
|
+ border-top: 1px solid #eee;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|