|
@@ -2,14 +2,15 @@
|
|
|
<div class="ele-body">
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
|
<header-title title="基本信息">
|
|
<header-title title="基本信息">
|
|
|
- <el-button @click="cancel" >返回</el-button>
|
|
|
|
|
|
|
+ <el-button @click="cancel">返回</el-button>
|
|
|
<el-button type="primary" @click="save" :loading="loading" v-if="type != 'detail'">保存</el-button>
|
|
<el-button type="primary" @click="save" :loading="loading" v-if="type != 'detail'">保存</el-button>
|
|
|
<el-button type="primary" @click="handleReporting" :loading="loading" v-if="type != 'detail'">报工完成</el-button>
|
|
<el-button type="primary" @click="handleReporting" :loading="loading" v-if="type != 'detail'">报工完成</el-button>
|
|
|
</header-title>
|
|
</header-title>
|
|
|
- <base-info ref="baseInfoRefs" v-if="form" :form="form" :btnType="type"></base-info>
|
|
|
|
|
|
|
+ <base-info ref="baseInfoRefs" v-if="form" :form="form" :btnType="type" :qualityType="qualityType"></base-info>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<header-title title="质检内容">
|
|
<header-title title="质检内容">
|
|
|
- <el-button type="primary" :loading="loading" v-if="type != 'detail'" @click="batchQuality(null,null,'report')">批量质检</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" :loading="loading" v-if="type != 'detail'"
|
|
|
|
|
+ @click="batchQuality(null, null, 'report')">批量质检</el-button>
|
|
|
</header-title>
|
|
</header-title>
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-tab-pane label="来源清单" name="1"></el-tab-pane>
|
|
<el-tab-pane label="来源清单" name="1"></el-tab-pane>
|
|
@@ -34,51 +35,57 @@
|
|
|
<el-table-column label="序号" type="index" width="50" align="center" fixed="left"></el-table-column>
|
|
<el-table-column label="序号" type="index" width="50" align="center" fixed="left"></el-table-column>
|
|
|
|
|
|
|
|
<template v-for="column in tableColumns">
|
|
<template v-for="column in tableColumns">
|
|
|
- <el-table-column :key="column.prop" :label="column.label" :prop="column.prop" :fixed="column.fixed" :show-overflow-tooltip="true"
|
|
|
|
|
- :width="column.width" :align="column.align">
|
|
|
|
|
|
|
+ <el-table-column :key="column.prop" :label="column.label" :prop="column.prop" :fixed="column.fixed"
|
|
|
|
|
+ :show-overflow-tooltip="true" :width="column.width" :align="column.align">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<template v-if="column.prop === 'categoryCode'">
|
|
<template v-if="column.prop === 'categoryCode'">
|
|
|
<el-link type="primary" :underline="false" @click="handleDetail(scope.$index, scope.row, 'detail')">
|
|
<el-link type="primary" :underline="false" @click="handleDetail(scope.$index, scope.row, 'detail')">
|
|
|
{{ scope.row.categoryCode }}
|
|
{{ scope.row.categoryCode }}
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
-<!-- <template v-else-if="column.prop === 'weight'">-->
|
|
|
|
|
-<!-- <el-input v-model="scope.row.weight"></el-input>-->
|
|
|
|
|
-<!-- </template>-->
|
|
|
|
|
|
|
+ <!-- <template v-else-if="column.prop === 'weight'">-->
|
|
|
|
|
+ <!-- <el-input v-model="scope.row.weight"></el-input>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
{{ scope.row[column.prop] }}
|
|
{{ scope.row[column.prop] }}
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</template>
|
|
</template>
|
|
|
- <el-table-column label="重量" prop="weight" align="center" width="100" fixed="right" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
+ <el-table-column label="重量" prop="weight" align="center" width="100" fixed="right"
|
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-input type="number" v-model="scope.row.weight" :min="0"></el-input>
|
|
<el-input type="number" v-model="scope.row.weight" :min="0"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="重量单位" prop="weightUnit" align="center" width="80" fixed="right" :show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
- <el-table-column label="处置状态" prop="disposalStatus" align="center" width="80" fixed="right" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
+ <el-table-column label="重量单位" prop="weightUnit" align="center" width="80" fixed="right"
|
|
|
|
|
+ :show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
+ <el-table-column label="处置状态" prop="disposalStatus" align="center" width="80" fixed="right"
|
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.disposalStatus == 1 && form.qualityType == 2">返工</span>
|
|
<span v-if="scope.row.disposalStatus == 1 && form.qualityType == 2">返工</span>
|
|
|
- <span v-if="scope.row.disposalStatus == 2 && form.qualityType == 2 ">返修</span>
|
|
|
|
|
- <span v-if="scope.row.disposalStatus == 3 ">报废</span>
|
|
|
|
|
|
|
+ <span v-if="scope.row.disposalStatus == 2 && form.qualityType == 2">返修</span>
|
|
|
|
|
+ <span v-if="scope.row.disposalStatus == 3">报废</span>
|
|
|
<span v-if="scope.row.disposalStatus == 4 && form.qualityType == 2">降级使用</span>
|
|
<span v-if="scope.row.disposalStatus == 4 && form.qualityType == 2">降级使用</span>
|
|
|
<span v-if="scope.row.disposalStatus == 5 && form.qualityType == 2">让步接收</span>
|
|
<span v-if="scope.row.disposalStatus == 5 && form.qualityType == 2">让步接收</span>
|
|
|
- <span v-if="scope.row.disposalStatus == 6 ">留样</span>
|
|
|
|
|
- <span v-if="scope.row.disposalStatus == 7 ">消耗</span>
|
|
|
|
|
- <span v-if="scope.row.disposalStatus == 8 ">回用</span>
|
|
|
|
|
|
|
+ <span v-if="scope.row.disposalStatus == 6">留样</span>
|
|
|
|
|
+ <span v-if="scope.row.disposalStatus == 7">消耗</span>
|
|
|
|
|
+ <span v-if="scope.row.disposalStatus == 8">回用</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="处置时间" prop="disposeTime" align="center" width="100" fixed="right" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
+ <el-table-column label="处置时间" prop="disposeTime" align="center" width="100" fixed="right"
|
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="质检状态" prop="qualityStatus" align="center" width="120" fixed="right" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
+ <el-table-column label="质检状态" prop="qualityStatus" align="center" width="120" fixed="right"
|
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.qualityStatus == 0 ">未检</span>
|
|
|
|
|
- <span v-if="scope.row.qualityStatus == 1 ">已检</span>
|
|
|
|
|
- <span v-if="scope.row.qualityStatus == 2 ">待检</span>
|
|
|
|
|
|
|
+ <span v-if="scope.row.qualityStatus == 0">未检</span>
|
|
|
|
|
+ <span v-if="scope.row.qualityStatus == 1">已检</span>
|
|
|
|
|
+ <span v-if="scope.row.qualityStatus == 2">待检</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="质检结果" prop="qualityResults" align="center" width="110" fixed="right" :show-overflow-tooltip="true">
|
|
|
|
|
|
|
+ <el-table-column label="质检结果" prop="qualityResults" align="center" width="110" fixed="right"
|
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-select v-model="scope.row.qualityResults" placeholder="请选择" style="width: 100%;"
|
|
<el-select v-model="scope.row.qualityResults" placeholder="请选择" style="width: 100%;"
|
|
|
:disabled="type == 'detail'" size="mini">
|
|
:disabled="type == 'detail'" size="mini">
|
|
@@ -93,7 +100,8 @@
|
|
|
@click="handleDetail(scope.$index, scope.row, 'report')">
|
|
@click="handleDetail(scope.$index, scope.row, 'report')">
|
|
|
质检
|
|
质检
|
|
|
</el-link>
|
|
</el-link>
|
|
|
- <el-link type='primary' :underline="false" @click="handleDispose(scope.$index, scope.row, 'dispose')"> 处置 </el-link>
|
|
|
|
|
|
|
+ <el-link type='primary' :underline="false" @click="handleDispose(scope.$index, scope.row, 'dispose')"> 处置
|
|
|
|
|
+ </el-link>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -191,6 +199,7 @@ export default {
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
categoryParamList: [],
|
|
categoryParamList: [],
|
|
|
type: '',
|
|
type: '',
|
|
|
|
|
+ qualityType: null,
|
|
|
title: '',
|
|
title: '',
|
|
|
loading: false,
|
|
loading: false,
|
|
|
|
|
|
|
@@ -214,7 +223,7 @@ export default {
|
|
|
prop: 'categoryCode',
|
|
prop: 'categoryCode',
|
|
|
width: '160',
|
|
width: '160',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- fixed:'left'
|
|
|
|
|
|
|
+ fixed: 'left'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: '名称',
|
|
label: '名称',
|
|
@@ -314,6 +323,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
async open(type) {
|
|
async open(type) {
|
|
|
this.type = this.$route.query.type;
|
|
this.type = this.$route.query.type;
|
|
|
|
|
+ this.qualityType = this.$route.query.qualityType;
|
|
|
this.title = this.type == 'add' ? '新增' : type == 'edit' ? '报工' : '详情';
|
|
this.title = this.type == 'add' ? '新增' : type == 'edit' ? '报工' : '详情';
|
|
|
|
|
|
|
|
if (this.type == 'add') {
|
|
if (this.type == 'add') {
|
|
@@ -322,6 +332,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async getDetail() {
|
|
async getDetail() {
|
|
|
|
|
+
|
|
|
getById(this.$route.query.id).then((res) => {
|
|
getById(this.$route.query.id).then((res) => {
|
|
|
this.form = res.data;
|
|
this.form = res.data;
|
|
|
|
|
|
|
@@ -358,7 +369,7 @@ export default {
|
|
|
...item
|
|
...item
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- console.log(addStatus, 'addStatus')
|
|
|
|
|
|
|
+ console.log(addStatus, '样品清单')
|
|
|
//样品
|
|
//样品
|
|
|
this.sampleList = addStatus;
|
|
this.sampleList = addStatus;
|
|
|
this.samplePagination.currentPage = 1;
|
|
this.samplePagination.currentPage = 1;
|
|
@@ -448,16 +459,16 @@ export default {
|
|
|
const selectedData = [];
|
|
const selectedData = [];
|
|
|
selectedData.push(this.sampleList[index])
|
|
selectedData.push(this.sampleList[index])
|
|
|
console.log(index, row, type, selectedData, 'index, row, type, mergedData')
|
|
console.log(index, row, type, selectedData, 'index, row, type, mergedData')
|
|
|
- this.$refs.detailRef.openDia(index, row, type, selectedData,null);
|
|
|
|
|
|
|
+ this.$refs.detailRef.openDia(index, row, type, selectedData, null);
|
|
|
},
|
|
},
|
|
|
handleDispose(index, row, type) {
|
|
handleDispose(index, row, type) {
|
|
|
- if (!this.sampleList[index] ) {
|
|
|
|
|
|
|
+ if (!this.sampleList[index]) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
// const selectedData = [];
|
|
// const selectedData = [];
|
|
|
// selectedData.push(this.sampleList[index])
|
|
// selectedData.push(this.sampleList[index])
|
|
|
// console.log(index, row, type, selectedData, 'index, row, type, mergedData')
|
|
// console.log(index, row, type, selectedData, 'index, row, type, mergedData')
|
|
|
- this.$refs.disposeRef.openDispose(index, row, type, null,this.form.qualityType);
|
|
|
|
|
|
|
+ this.$refs.disposeRef.openDispose(index, row, type, null, this.form.qualityType);
|
|
|
},
|
|
},
|
|
|
// 报工
|
|
// 报工
|
|
|
handleReporting(index, row) {
|
|
handleReporting(index, row) {
|
|
@@ -487,9 +498,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 处理确认事件
|
|
// 处理确认事件
|
|
|
handleDisposeConfirm(list, index) {
|
|
handleDisposeConfirm(list, index) {
|
|
|
- if (index != null){
|
|
|
|
|
|
|
+ if (index != null) {
|
|
|
this.$set(this.sampleList, index, list[0]);
|
|
this.$set(this.sampleList, index, list[0]);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.$set(this.sampleList, null, list);
|
|
this.$set(this.sampleList, null, list);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -513,23 +524,23 @@ export default {
|
|
|
if (item.qualitySampleTemplateList.some(child => child.qualityResults === 2)) {
|
|
if (item.qualitySampleTemplateList.some(child => child.qualityResults === 2)) {
|
|
|
item.isValid = false;
|
|
item.isValid = false;
|
|
|
item.qualityResults = 2;
|
|
item.qualityResults = 2;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
item.isValid = true;
|
|
item.isValid = true;
|
|
|
item.qualityResults = 1;
|
|
item.qualityResults = 1;
|
|
|
}
|
|
}
|
|
|
item.qualityStatus = 1;
|
|
item.qualityStatus = 1;
|
|
|
})
|
|
})
|
|
|
- if (index != null){
|
|
|
|
|
|
|
+ if (index != null) {
|
|
|
this.$set(this.sampleList, index, list[0]);
|
|
this.$set(this.sampleList, index, list[0]);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
this.$set(this.sampleList, null, list);
|
|
this.$set(this.sampleList, null, list);
|
|
|
}
|
|
}
|
|
|
- console.log(this.sampleList, '222表')
|
|
|
|
|
|
|
+ console.log(this.sampleList, '222表')
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
// 批量质检
|
|
// 批量质检
|
|
|
- batchQuality(index, row,type){
|
|
|
|
|
- this.$refs.detailRef.openDia(null, null,type, this.sampleList, null)
|
|
|
|
|
|
|
+ batchQuality(index, row, type) {
|
|
|
|
|
+ this.$refs.detailRef.openDia(null, null, type, this.sampleList, null)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|