|
|
|
@ -231,19 +231,25 @@
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<!-- 检验项目明细 -->
|
|
|
|
|
<el-table v-loading="loading" :data="checkProjectList" >
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
|
|
<el-table-column label="序号" align="center" type="index" width="50"/>
|
|
|
|
|
<el-table-column label="检验项目" align="center" prop="ruleName" />
|
|
|
|
|
<el-table-column label="标准要求" align="center" prop="checkStandard" width="160"/>
|
|
|
|
|
<el-table-column label="抽检数" align="center" prop="sampleNum" />
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unitCode" />
|
|
|
|
|
<el-table-column label="抽检数" align="center" prop="sampleNum" width="60"/>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unitCode" width="50"/>
|
|
|
|
|
<el-table-column label="实测结果" align="center" prop="actualValue" width="160"/>
|
|
|
|
|
<el-table-column label="判定" align="center" prop="status" >
|
|
|
|
|
<el-table-column label="判定" align="center" prop="status" width="70">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.check_result" :value="scope.row.status"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="附件" align="center" prop="files" width="200">
|
|
|
|
|
<el-table-column label="不良类型" align="center" prop="defectCode" width="80">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.defectCode">{{ getCodeValue(scope.row.defectCode) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="不良数量" align="center" prop="defectQuality" width="80"/>
|
|
|
|
|
<el-table-column label="附件" align="center" prop="files" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-image v-for="(item,index) in scope.row.files" :key="index"
|
|
|
|
|
:src="item.fileAddress"
|
|
|
|
@ -296,8 +302,9 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listIncome, getIncome, delIncome, addIncome, updateIncome,getCkeckProjectList} from "@/api/quality/inventoryReport";
|
|
|
|
|
import { listInventory, getInventory, delInventory, addInventory, updateInventory,getCkeckProjectList} from "@/api/quality/inventoryReport";
|
|
|
|
|
import { getCheckTypes } from "@/api/quality/qcProduce";
|
|
|
|
|
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
export default {
|
|
|
|
|
name: "InventoryReport",
|
|
|
|
@ -336,6 +343,7 @@ export default {
|
|
|
|
|
incomeList: [],
|
|
|
|
|
// 检验项目列表
|
|
|
|
|
checkProjectList: [],
|
|
|
|
|
defectList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
@ -383,6 +391,7 @@ export default {
|
|
|
|
|
this.getDate();
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getCheckTypes();
|
|
|
|
|
this.getDefectType();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/****/
|
|
|
|
@ -416,7 +425,7 @@ export default {
|
|
|
|
|
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
listIncome(this.queryParams).then(response => {
|
|
|
|
|
listInventory(this.queryParams).then(response => {
|
|
|
|
|
this.incomeList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -489,7 +498,7 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
const recordId = row.recordId || this.ids
|
|
|
|
|
this.queryParams.recordId = recordId;
|
|
|
|
|
getIncome(recordId).then(response => {
|
|
|
|
|
getInventory(recordId).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.form.printable = 'printFrom'; //打印时需要
|
|
|
|
|
this.form.ignore = ['no-print'];//打印时需要
|
|
|
|
@ -503,13 +512,13 @@ export default {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.recordId != null) {
|
|
|
|
|
updateIncome(this.form).then(response => {
|
|
|
|
|
updateInventory(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addIncome(this.form).then(response => {
|
|
|
|
|
addInventory(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
@ -522,7 +531,7 @@ export default {
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const recordIds = row.recordId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除库存检验编号为"' + recordIds + '"的数据项?').then(function() {
|
|
|
|
|
return delIncome(recordIds);
|
|
|
|
|
return delInventory(recordIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
@ -558,6 +567,16 @@ export default {
|
|
|
|
|
properties: params.properties || null
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getDefectType() {
|
|
|
|
|
const defectType = "inventory";
|
|
|
|
|
getDefectTypeListByDefectType(defectType).then(response => {
|
|
|
|
|
this.defectList = response.rows;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getCodeValue(defectCode) {
|
|
|
|
|
const foundDefect = this.defectList.find(defect => defect.defectCode === defectCode);
|
|
|
|
|
return foundDefect.defectSubclass;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|