Commit f836aed3 authored by 沈翠玲's avatar 沈翠玲

工序检测模版和检测模版

parent 60e94ece
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
import { listQctemplate, getQctemplate, delQctemplate, addQctemplate, updateQctemplate } from "@/api/mes/qc/qctemplate"; import { listQctemplate, getQctemplate, delQctemplate, addQctemplate, updateQctemplate } from "@/api/mes/qc/qctemplate";
export default { export default {
name: "QcindexSelect", name: "QcindexSelect",
props: ['qcType'],
dicts: ['mes_index_type','mes_qc_type'], dicts: ['mes_index_type','mes_qc_type'],
data() { data() {
return { return {
...@@ -127,6 +128,13 @@ export default { ...@@ -127,6 +128,13 @@ export default {
form: {} form: {}
}; };
}, },
watch: {
showFlag () {
if(this.showFlag) {
this.getList();
}
}
},
created() { created() {
this.getList(); this.getList();
}, },
...@@ -134,7 +142,11 @@ export default { ...@@ -134,7 +142,11 @@ export default {
/** 查询检测项列表 */ /** 查询检测项列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listQctemplate(this.queryParams).then(response => { const params = this.queryParams
if (this.qcType) {
params['qcType'] = this.qcType
}
listQctemplate(params).then(response => {
this.qctemplateList = response.rows; this.qctemplateList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
......
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
<el-table v-loading="loading" :data="pendingList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="pendingList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="单据编码" align="center" prop="sourceDocCode" /> <el-table-column label="单据编码" align="center" prop="sourceDocCode" />
<el-table-column label="检测项型" align="center" prop="qcType"> <el-table-column label="模版类型" align="center" prop="qcType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.mes_qc_type" :value="scope.row.qcType"/> <dict-tag :options="dict.type.qc_type" :value="scope.row.qcType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物资编码" align="center" prop="itemCode" /> <el-table-column label="物资编码" align="center" prop="itemCode" />
......
...@@ -25,6 +25,11 @@ ...@@ -25,6 +25,11 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="模板类型" prop="qcType">
<el-select v-model="queryParams.qcType" placeholder="请选择模板类型" clearable>
<el-option :label="item.label" :value="item.value" v-for="item in dict.type.qc_type" :key="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="产品名称" prop="itemName"> <el-form-item label="产品名称" prop="itemName">
<el-input <el-input
v-model="queryParams.itemName" v-model="queryParams.itemName"
...@@ -164,8 +169,11 @@ ...@@ -164,8 +169,11 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="模板类型" prop="qcType"> <el-form-item label="模板类型" prop="qcType">
<el-radio-group v-model="form.qcType"> <el-radio-group v-model="form.qcType">
<el-radio label="IPQC">IPQC</el-radio> <el-radio
<el-radio label="IQC">IQC</el-radio> v-for="dict in dict.type.qc_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -233,7 +241,7 @@ import TemplateIndex from "./templateindex.vue" ...@@ -233,7 +241,7 @@ import TemplateIndex from "./templateindex.vue"
import TemplateProduct from "./templateproduct"; import TemplateProduct from "./templateproduct";
export default { export default {
name: "Qctemplate", name: "Qctemplate",
dicts: ['sys_yes_no','mes_qc_type'], dicts: ['sys_yes_no','mes_qc_type', 'qc_type'],
components: {TemplateIndex,TemplateProduct}, components: {TemplateIndex,TemplateProduct},
data() { data() {
return { return {
...@@ -264,6 +272,7 @@ export default { ...@@ -264,6 +272,7 @@ export default {
pageSize: 10, pageSize: 10,
templateCode: null, templateCode: null,
templateName: null, templateName: null,
qcType: null,
itemCode:null, itemCode:null,
itemName:null, itemName:null,
qcTypesParam: [], qcTypesParam: [],
......
...@@ -35,6 +35,11 @@ ...@@ -35,6 +35,11 @@
<el-option label="请选择字典生成" value=""/> <el-option label="请选择字典生成" value=""/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="模板类型" prop="qcType">
<el-select v-model="queryParams.qcType" placeholder="请选择模板类型" clearable>
<el-option :label="item.label" :value="item.value" v-for="item in dict.type.qc_type" :key="item.value"/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -105,7 +110,10 @@ ...@@ -105,7 +110,10 @@
<el-table v-loading="loading" :data="templateProcessList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="templateProcessList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="模板类型" align="center" prop="qcType"> <el-table-column label="模板类型" align="center" prop="qcType">
</el-table-column> <template slot-scope="scope">
<dict-tag :options="dict.type.qc_type" :value="scope.row.qcType"/>
</template>
</el-table-column>
<el-table-column label="检测模板" align="center" prop="templateName"/> <el-table-column label="检测模板" align="center" prop="templateName"/>
<el-table-column label="物料类型名称" align="center" prop="itemTypeName"/> <el-table-column label="物料类型名称" align="center" prop="itemTypeName"/>
<el-table-column label="工序名称" align="center" prop="processName"/> <el-table-column label="工序名称" align="center" prop="processName"/>
...@@ -148,15 +156,18 @@ ...@@ -148,15 +156,18 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="模板类型" prop="qcType"> <el-form-item label="模板类型" prop="qcType">
<el-radio-group v-model="form.qcType"> <el-radio-group v-model="form.qcType">
<el-radio label="IPQC">IPQC</el-radio> <el-radio
<el-radio label="IQC">IQC</el-radio> v-for="dict in dict.type.qc_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="检测模板" prop="templateId"> <el-form-item label="检测模板" prop="templateId">
<el-input v-model="form.templateName" placeholder="请选择检测模板"> <el-input v-model="form.templateName" placeholder="请选择检测模板">
<el-button slot="append" @click="handleSelectTemplate" icon="el-icon-search"></el-button> <el-button slot="append" @click="handleSelectTemplate" icon="el-icon-search"></el-button>
</el-input> </el-input>
<TemplateSelect ref="templateSelect" @onSelected="onTemplateSelected"></TemplateSelect> <TemplateSelect ref="templateSelect" :qcType="form.qcType" @onSelected="onTemplateSelected"></TemplateSelect>
</el-form-item> </el-form-item>
<el-form-item label="物料类型" prop="itemTypeId"> <el-form-item label="物料类型" prop="itemTypeId">
<treeselect v-model="form.itemTypeId" :options="itemTypeOptions" :show-count="true" <treeselect v-model="form.itemTypeId" :options="itemTypeOptions" :show-count="true"
...@@ -252,6 +263,7 @@ import {getToken} from "@/utils/auth"; ...@@ -252,6 +263,7 @@ import {getToken} from "@/utils/auth";
export default { export default {
name: "TemplateProcess", name: "TemplateProcess",
dicts: ['qc_type'],
components: { components: {
Treeselect, Treeselect,
TemplateSelect, TemplateSelect,
...@@ -289,6 +301,7 @@ export default { ...@@ -289,6 +301,7 @@ export default {
maxNum: null, maxNum: null,
isConfirm: null, isConfirm: null,
isNewProduct: null, isNewProduct: null,
qcType: null,
attr1: null, attr1: null,
attr2: null, attr2: null,
attr3: null, attr3: null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment