出货检验单行前端代码

This commit is contained in:
JinLu.Yin 2022-09-01 20:36:09 +08:00
parent 5906392b2b
commit 5fd0106599
5 changed files with 188 additions and 11 deletions

44
src/api/mes/qc/oqcline.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询出货检验单行列表
export function listOqcline(query) {
return request({
url: '/mes/qc/oqcline/list',
method: 'get',
params: query
})
}
// 查询出货检验单行详细
export function getOqcline(lineId) {
return request({
url: '/mes/qc/oqcline/' + lineId,
method: 'get'
})
}
// 新增出货检验单行
export function addOqcline(data) {
return request({
url: '/mes/qc/oqcline',
method: 'post',
data: data
})
}
// 修改出货检验单行
export function updateOqcline(data) {
return request({
url: '/mes/qc/oqcline',
method: 'put',
data: data
})
}
// 删除出货检验单行
export function delOqcline(lineId) {
return request({
url: '/mes/qc/oqcline/' + lineId,
method: 'delete'
})
}

View File

@ -25,6 +25,7 @@
icon="el-icon-edit"
@click="handleDefect(scope.row)"
v-hasPermi="['mes:qc:ipqc:edit']"
v-if="optType !='view'"
>缺陷记录</el-button>
</template>
</el-table-column>

View File

@ -25,6 +25,7 @@
icon="el-icon-edit"
@click="handleDefect(scope.row)"
v-hasPermi="['mes:qc:iqcline:edit']"
v-if="optType !='view'"
>缺陷记录</el-button>
</template>
</el-table-column>

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="出货检验单编号" prop="oqcCode">
<el-form-item label="检验单编号" prop="oqcCode">
<el-input
v-model="queryParams.oqcCode"
placeholder="请输入出货检验单编号"
@ -42,12 +42,14 @@
/>
</el-form-item>
<el-form-item label="检测结果" prop="checkResult">
<el-input
v-model="queryParams.checkResult"
placeholder="请输入检测结果"
clearable
@keyup.enter.native="handleQuery"
/>
<el-select v-model="queryParams.checkResult" placeholder="请选择检测结果">
<el-option
v-for="dict in dict.type.mes_qc_result"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -341,8 +343,11 @@
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
<el-divider v-if="form.oqcId !=null" content-position="center">检测项</el-divider>
<el-card shadow="always" v-if="form.oqcId !=null" class="box-card">
<Oqcline ref=line :ipqcId="form.oqcId" :optType="optType"></Oqcline>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' "> </el-button>
@ -356,11 +361,13 @@
<script>
import { listOqc, getOqc, delOqc, addOqc, updateOqc } from "@/api/mes/qc/oqc";
import ItemSelect from "@/components/itemSelect/single.vue";
import {genCode} from "@/api/system/autocode/rule";
import Oqcline from "./line.vue";
export default {
name: "Oqc",
dicts: ['mes_order_status','mes_qc_result'],
components: {
ItemSelect
ItemSelect,Oqcline
},
data() {
return {
@ -609,7 +616,7 @@ export default {
//
handleAutoGenChange(autoGenFlag){
if(autoGenFlag){
genCode('QC_OQC_CODE').then(response =>{
genCode('OQC_CODE').then(response =>{
this.form.oqcCode = response;
});
}else{

View File

@ -0,0 +1,124 @@
<template>
<div class="app-container">
<el-table v-loading="loading" :data="oqclineList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="检测项名称" align="center" prop="indexName" />
<el-table-column label="检测项类型" width="100px" align="center" prop="indexType">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_index_type" :value="scope.row.indexType"/>
</template>
</el-table-column>
<el-table-column label="检测工具" align="center" prop="qcTool" />
<el-table-column label="检测要求" align="center" prop="checkMethod" />
<el-table-column label="标准值" align="center" prop="standerVal" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="误差上限" align="center" prop="thresholdMax" />
<el-table-column label="误差下限" align="center" prop="thresholdMin" />
<el-table-column label="致命缺陷数量" align="center" prop="crQuantity" />
<el-table-column label="严重缺陷数量" align="center" prop="majQuantity" />
<el-table-column label="轻微缺陷数量" align="center" prop="minQuantity" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDefect(scope.row)"
v-hasPermi="['mes:qc:oqc:edit']"
v-if="optType !='view'"
>缺陷记录</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<Defectrecord ref="defectDialog" :qcId="defect_qcid" :lineId="defect_qclineid" :qcType="defect_qctype" :optType="optType"></Defectrecord>
</div>
</template>
<script>
import { listOqcline, getOqcline, delOqcline, addOqcline, updateOqcline } from "@/api/mes/qc/oqcline";
import Defectrecord from "../defectrecord/index.vue"
export default {
name: "Oqcline",
components: {Defectrecord},
props: {
oqcId: null,
optType: undefined
},
data() {
return {
defect_qcid: null,
defect_qclineid: null,
defect_qctype: 'OQC',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
oqclineList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
oqcId: this.oqcId,
indexId: null,
indexCode: null,
indexName: null,
indexType: null,
qcTool: null,
checkMethod: null,
standerVal: null,
unitOfMeasure: null,
thresholdMax: null,
thresholdMin: null,
crQuantity: null,
majQuantity: null,
minQuantity: null,
}
};
},
created() {
this.getList();
},
methods: {
/** 查询出货检验单行列表 */
getList() {
this.loading = true;
listOqcline(this.queryParams).then(response => {
this.oqclineList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
handleDefect(row){
this.defect_qcid = row.oqcId;
this.defect_qclineid = row.lineId;
this.$nextTick(() => {
this.$refs.defectDialog.showFlag = true;
this.$refs.defectDialog.getList();
})
}
}
};
</script>