|
|
@@ -3,9 +3,14 @@
|
|
|
<el-card shadow="never">
|
|
|
<!-- <search ref="search" @search="search"></search> -->
|
|
|
<seek-page :seekList="seekList" @search="search"></seek-page>
|
|
|
-
|
|
|
- <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :pageSize="20"
|
|
|
- :pageSizes="[20, 30, 40, 50, 100]">
|
|
|
+
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="datasource"
|
|
|
+ :pageSize="20"
|
|
|
+ :pageSizes="[20, 30, 40, 50, 100]"
|
|
|
+ >
|
|
|
<!-- 表头工具栏 -->
|
|
|
<!-- <template v-slot:toolbar>-->
|
|
|
<!-- <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit('add')">-->
|
|
|
@@ -14,9 +19,7 @@
|
|
|
<!-- </template>-->
|
|
|
|
|
|
<template v-slot:code="{ row }">
|
|
|
- <el-link type="primary" :underline="false" @click="openEdit('detail', row)">
|
|
|
- {{ row.code }}
|
|
|
- </el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="openEdit('detail', row)">{{ row.code }}</el-link>
|
|
|
</template>
|
|
|
|
|
|
<!-- <template v-slot:qualityPlanName="{ row }">-->
|
|
|
@@ -24,52 +27,61 @@
|
|
|
<!-- <div v-else><el-tag size="mini">自建</el-tag></div>-->
|
|
|
<!-- </template>-->
|
|
|
<template v-slot:sourceCode="{ row }">
|
|
|
- <div v-if="row.qualityType == 1"> {{ row.qualityPlanCode }}</div>
|
|
|
+ <div v-if="row.qualityType == 1">{{ row.qualityPlanCode }}</div>
|
|
|
<div v-if="row.qualityType == 2">{{ row.workOrderCode }}</div>
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:files="scope">
|
|
|
- <el-link v-for="link in scope.row.files" :key="link.id" type="primary" :underline="false"
|
|
|
- @click="downloadFile(link)">
|
|
|
- {{ link.name }}
|
|
|
- </el-link>
|
|
|
+ <el-link
|
|
|
+ v-for="link in scope.row.files"
|
|
|
+ :key="link.id"
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click="downloadFile(link)"
|
|
|
+ >{{ link.name }}</el-link>
|
|
|
</template>
|
|
|
|
|
|
- <template v-slot:qualityType="{ row }">
|
|
|
- {{ getDictValue('质检计划类型', row.qualityType) }}
|
|
|
- </template>
|
|
|
- <template v-slot:qualityMode="{ row }">
|
|
|
- {{ getDictValue('取样类型', row.qualityMode) }}
|
|
|
- </template>
|
|
|
+ <template v-slot:qualityType="{ row }">{{ getDictValue('质检计划类型', row.qualityType) }}</template>
|
|
|
+ <template v-slot:qualityMode="{ row }">{{ getDictValue('取样类型', row.qualityMode) }}</template>
|
|
|
<template v-slot:accessory="scope">
|
|
|
- <el-link v-for="link in scope.row.accessory" :key="link.id" type="primary" :underline="false"
|
|
|
- @click="downloadFile(link)">
|
|
|
- {{ link.name }}
|
|
|
- </el-link>
|
|
|
+ <el-link
|
|
|
+ v-for="link in scope.row.accessory"
|
|
|
+ :key="link.id"
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click="downloadFile(link)"
|
|
|
+ >{{ link.name }}</el-link>
|
|
|
</template>
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-link type="primary" :underline="false" v-if="row.status == 0" @click="openEdit('edit', row)">
|
|
|
- 报工
|
|
|
- </el-link>
|
|
|
- <el-link type="primary" :underline="false" @click="openNumber(row)">
|
|
|
- 合格证
|
|
|
- </el-link>
|
|
|
- <jimureportBrowse style="display: inline-block;margin-left: 5px;" v-if="row.status == 1" text="质检报告" :businessId="row.id" businessCode="qmsqualityinspectionprint"></jimureportBrowse>
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ v-if="row.status == 0"
|
|
|
+ @click="openEdit('edit', row)"
|
|
|
+ >报工</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="openNumber(row)">合格证</el-link>
|
|
|
+ <jimureportBrowse
|
|
|
+ style="display: inline-block;margin-left: 5px;"
|
|
|
+ v-if="row.status == 1"
|
|
|
+ text="质检报告"
|
|
|
+ :businessId="row.id"
|
|
|
+ businessCode="qmsqualityinspectionprint"
|
|
|
+ ></jimureportBrowse>
|
|
|
<!-- <el-link type="primary" :underline="false">
|
|
|
质检报告
|
|
|
- </el-link> -->
|
|
|
+ </el-link>-->
|
|
|
<!-- <el-popconfirm class="ele-action" title="确定要删除吗?" @confirm="remove(row)" v-if="row.status == 0">
|
|
|
<template v-slot:reference>
|
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
删除
|
|
|
</el-link>
|
|
|
</template>
|
|
|
-</el-popconfirm> -->
|
|
|
+ </el-popconfirm>-->
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
<!-- -->
|
|
|
- <el-dialog title="修改" :visible.sync="certificateVisible" width="25%" :before-close="handleClose">
|
|
|
+ <!-- <el-dialog title="修改" :visible.sync="certificateVisible" width="25%" :before-close="handleClose">
|
|
|
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
|
|
<el-form-item label="合格证号">
|
|
|
<el-input v-model="formData.certificateNumber" placeholder="请输入"></el-input>
|
|
|
@@ -79,15 +91,21 @@
|
|
|
<el-button @click="handleClose">取 消</el-button>
|
|
|
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
|
|
</span>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog>-->
|
|
|
<!-- -->
|
|
|
</el-card>
|
|
|
+ <Certificate @search="search" v-if="addOpen" :rowData="rowData" :addOpen="addOpen" @closeModel="closeModel" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import Certificate from './components/Certificate.vue'
|
|
|
import search from './components/search.vue';
|
|
|
-import jimureportBrowse from '@/components/jimureport/browseModal.vue'
|
|
|
-import { getList, removeItem, updateCertificateNumber } from '@/api/inspectionWork';
|
|
|
+import jimureportBrowse from '@/components/jimureport/browseModal.vue';
|
|
|
+import {
|
|
|
+ getList,
|
|
|
+ removeItem,
|
|
|
+ updateCertificateNumber
|
|
|
+} from '@/api/inspectionWork';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import { getFile } from '@/api/system/file';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
@@ -96,7 +114,8 @@ export default {
|
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
|
search,
|
|
|
- jimureportBrowse
|
|
|
+ jimureportBrowse,
|
|
|
+ Certificate
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -150,7 +169,8 @@ export default {
|
|
|
align: 'center',
|
|
|
width: 120,
|
|
|
showOverflowTooltip: true
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
prop: 'qualityName',
|
|
|
label: '质检人',
|
|
|
align: 'center',
|
|
|
@@ -279,18 +299,21 @@ export default {
|
|
|
formData: {
|
|
|
certificateNumber: ''
|
|
|
},
|
|
|
- certificateVisible: false,
|
|
|
+ // certificateVisible: false,
|
|
|
rowData: {},
|
|
|
- typeList:[],//类型列表
|
|
|
- qualityMode:[], //取样类型
|
|
|
- statusList: [{
|
|
|
- value: 0,
|
|
|
- label: '未报工'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 1,
|
|
|
- label: '已报工'
|
|
|
- }]
|
|
|
+ typeList: [], //类型列表
|
|
|
+ qualityMode: [], //取样类型
|
|
|
+ statusList: [
|
|
|
+ {
|
|
|
+ value: 0,
|
|
|
+ label: '未报工'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 1,
|
|
|
+ label: '已报工'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ addOpen: false
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -300,64 +323,62 @@ export default {
|
|
|
this.getTnspectionPlanType();
|
|
|
this.getQualityMethodCode();
|
|
|
},
|
|
|
- computed:{
|
|
|
+ computed: {
|
|
|
seekList() {
|
|
|
return [
|
|
|
{
|
|
|
- label: "工单编码:",
|
|
|
- value: "code",
|
|
|
- type: "input",
|
|
|
- placeholder: '',
|
|
|
+ label: '工单编码:',
|
|
|
+ value: 'code',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
},
|
|
|
{
|
|
|
- label: "工单名称:",
|
|
|
- value: "name",
|
|
|
- type: "input",
|
|
|
- placeholder: '',
|
|
|
+ label: '工单名称:',
|
|
|
+ value: 'name',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
},
|
|
|
{
|
|
|
- label: "来源单号:",
|
|
|
- value: "sourceCode",
|
|
|
- type: "input",
|
|
|
- placeholder: '',
|
|
|
+ label: '来源单号:',
|
|
|
+ value: 'sourceCode',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
},
|
|
|
{
|
|
|
- label: "类型:",
|
|
|
- value: "qualityType",
|
|
|
- type: "select",
|
|
|
+ label: '类型:',
|
|
|
+ value: 'qualityType',
|
|
|
+ type: 'select',
|
|
|
placeholder: '',
|
|
|
- planList:this.typeList
|
|
|
+ planList: this.typeList
|
|
|
},
|
|
|
{
|
|
|
- label: "质检方式:",
|
|
|
- value: "qualityMode",
|
|
|
- type: "select",
|
|
|
+ label: '质检方式:',
|
|
|
+ value: 'qualityMode',
|
|
|
+ type: 'select',
|
|
|
placeholder: '',
|
|
|
- planList:this.qualityMode
|
|
|
-
|
|
|
+ planList: this.qualityMode
|
|
|
},
|
|
|
{
|
|
|
- label: "编码:",
|
|
|
- value: "productCode",
|
|
|
- type: "input",
|
|
|
- placeholder: '',
|
|
|
+ label: '编码:',
|
|
|
+ value: 'productCode',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
},
|
|
|
{
|
|
|
- label: "名称:",
|
|
|
- value: "productName",
|
|
|
- type: "input",
|
|
|
- placeholder: '',
|
|
|
+ label: '名称:',
|
|
|
+ value: 'productName',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: ''
|
|
|
},
|
|
|
{
|
|
|
- label: "状态:",
|
|
|
- value: "status",
|
|
|
- type: "select",
|
|
|
+ label: '状态:',
|
|
|
+ value: 'status',
|
|
|
+ type: 'select',
|
|
|
placeholder: '',
|
|
|
- planList:this.statusList
|
|
|
-
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
+ planList: this.statusList
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
datasource({ page, where, limit }) {
|
|
|
@@ -398,7 +419,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if (!found) {
|
|
|
@@ -414,7 +434,7 @@ export default {
|
|
|
this.$message.success(message);
|
|
|
this.done();
|
|
|
})
|
|
|
- .catch((e) => { });
|
|
|
+ .catch((e) => {});
|
|
|
},
|
|
|
done() {
|
|
|
this.$refs.search.search();
|
|
|
@@ -422,31 +442,35 @@ export default {
|
|
|
openNumber(row) {
|
|
|
this.formData.certificateNumber = row.certificateNumber;
|
|
|
this.rowData = row;
|
|
|
- this.certificateVisible = true
|
|
|
- },
|
|
|
- handleClose() {
|
|
|
- this.certificateVisible = false;
|
|
|
+ this.addOpen = true;
|
|
|
+ // this.certificateVisible = true
|
|
|
},
|
|
|
- async handleSubmit() {
|
|
|
- this.rowData.certificateNumber = this.formData.certificateNumber;
|
|
|
- this.rowData.qualityTimeStart = new Date(this.rowData.qualityTimeStart);
|
|
|
- this.rowData.qualityTimeEnd = new Date(this.rowData.qualityTimeEnd);
|
|
|
-
|
|
|
- const data = await updateCertificateNumber(this.rowData)
|
|
|
- if (data) {
|
|
|
- this.$message.success('修改成功!');
|
|
|
- this.done();
|
|
|
- }
|
|
|
- this.certificateVisible = false;
|
|
|
+ closeModel(){
|
|
|
+ this.addOpen = false;
|
|
|
},
|
|
|
+ // handleClose() {
|
|
|
+ // this.certificateVisible = false;
|
|
|
+ // },
|
|
|
+ // async handleSubmit() {
|
|
|
+ // this.rowData.certificateNumber = this.formData.certificateNumber;
|
|
|
+ // this.rowData.qualityTimeStart = new Date(this.rowData.qualityTimeStart);
|
|
|
+ // this.rowData.qualityTimeEnd = new Date(this.rowData.qualityTimeEnd);
|
|
|
+
|
|
|
+ // const data = await updateCertificateNumber(this.rowData)
|
|
|
+ // if (data) {
|
|
|
+ // this.$message.success('修改成功!');
|
|
|
+ // this.done();
|
|
|
+ // }
|
|
|
+ // this.certificateVisible = false;
|
|
|
+ // },
|
|
|
|
|
|
async getTnspectionPlanType() {
|
|
|
let res = await getByCode('inspection_plan_type');
|
|
|
if (res?.code == 0) {
|
|
|
- let list = res.data.map(item => {
|
|
|
- let key = Object.keys(item)[0]
|
|
|
- return {value: key, label: item[key]}
|
|
|
- })
|
|
|
+ let list = res.data.map((item) => {
|
|
|
+ let key = Object.keys(item)[0];
|
|
|
+ return { value: key, label: item[key] };
|
|
|
+ });
|
|
|
this.typeList = list;
|
|
|
}
|
|
|
},
|
|
|
@@ -454,13 +478,13 @@ export default {
|
|
|
async getQualityMethodCode() {
|
|
|
let res = await getByCode('quality_method_code');
|
|
|
if (res?.code == 0) {
|
|
|
- let list = res.data.map(item => {
|
|
|
- let key = Object.keys(item)[0]
|
|
|
- return {value: key, label: item[key]}
|
|
|
- })
|
|
|
+ let list = res.data.map((item) => {
|
|
|
+ let key = Object.keys(item)[0];
|
|
|
+ return { value: key, label: item[key] };
|
|
|
+ });
|
|
|
this.qualityMode = list;
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|