过程检验修改

master
zhaoxiaolin 11 months ago
parent 60084d99e2
commit a2016f72b8

@ -145,7 +145,7 @@ export function getDefectList(defectType) {
}); });
} }
// 查询人员列表 // 查询来料单列表
export function getLLWorkOrder(query) { export function getLLWorkOrder(query) {
return request({ return request({
url: '/quality/qcIncome/getLLWorkOrder', url: '/quality/qcIncome/getLLWorkOrder',
@ -153,3 +153,12 @@ export function getLLWorkOrder(query) {
params: query params: query
}); });
} }
// 查询生产过程-工单列表
export function getWorkOrder(query) {
return request({
url: '/quality/qcIncome/getWorkOrder',
method: 'get',
params: query
});
}

@ -9,6 +9,16 @@ export function listProject(query) {
}); });
} }
// 查询检验项目维护列表
export function getProjectList(query) {
return request({
url: '/quality/project/getProjectList',
method: 'get',
params: query
});
}
// 查询检验项目维护详细 // 查询检验项目维护详细
export function getProject(id) { export function getProject(id) {
return request({ return request({

@ -77,3 +77,15 @@ export function changeProduceStatus(recordId, status) {
data: data data: data
}) })
} }
//获取批次
export function getBatchList(workorderCode) {
const data = {
workorderCode
}
return request({
url: '/quality/qcIncome/getBatchList',
method: 'put',
data: data
});
}

@ -166,7 +166,7 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<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="projectId"> <el-form-item label="规则名称" prop="projectId">
<el-select v-model="form.projectId" @change="handleChange" placeholder="请选择检验规则属性" > <el-select filterable v-model="form.projectId" @change="handleChange" placeholder="请选择检验规则属性" >
<el-option <el-option
v-for="item in checkRuleList" v-for="item in checkRuleList"
:key="item.id" :key="item.id"
@ -235,7 +235,7 @@ import {
} from "@/api/quality/checkTypeProject"; } from "@/api/quality/checkTypeProject";
import MaterialGroupAdd from "./MaterialGroupAdd.vue"; import MaterialGroupAdd from "./MaterialGroupAdd.vue";
import {listCheckType} from "@/api/quality/checkType"; import {listCheckType} from "@/api/quality/checkType";
import {listProject} from "@/api/quality/project"; import {getProjectList} from "@/api/quality/project";
export default { export default {
name: "CheckTypeProject", name: "CheckTypeProject",
@ -310,8 +310,8 @@ export default {
methods: { methods: {
/**获取检测项目列表**/ /**获取检测项目列表**/
getProjectList(){ getProjectList(){
listProject().then((response) => { getProjectList().then((response) => {
this.checkRuleList = response.rows; this.checkRuleList = response;
}); });
}, },
/** 查询物料检验项目维护列表 */ /** 查询物料检验项目维护列表 */

@ -108,7 +108,6 @@
<el-table-column label="单位" align="center" prop="unitCode" > <el-table-column label="单位" align="center" prop="unitCode" >
<template slot-scope="scope"><dict-tag :options="dict.type.unit" :value="scope.row.unitCode"/></template> <template slot-scope="scope"><dict-tag :options="dict.type.unit" :value="scope.row.unitCode"/></template>
</el-table-column> </el-table-column>
<el-table-column label="检验标准" align="center" prop="checkStandard" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="抽样方案" align="center" prop="samplePlan" :show-overflow-tooltip="true" width="200"/> <el-table-column label="抽样方案" align="center" prop="samplePlan" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="合格判定" align="center" prop="judge" :show-overflow-tooltip="true" width="200"/> <el-table-column label="合格判定" align="center" prop="judge" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">

@ -162,10 +162,10 @@
<el-table-column label="id" align="center" prop="recordId" v-if="false"/> <el-table-column label="id" align="center" prop="recordId" v-if="false"/>
<el-table-column label="checkType" align="center" prop="checkType" v-if="false"/> <el-table-column label="checkType" align="center" prop="checkType" v-if="false"/>
<el-table-column label="任务编号" align="center" prop="checkNo" width="120"/> <el-table-column label="任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="120"/> <el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" />
<el-table-column label="订单号" align="center" prop="orderNo" width="120"/> <el-table-column label="订单号" align="center" prop="orderNo" width="120"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="170"/> <el-table-column label="物料号" align="center" prop="materialCode" width="170"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/> <el-table-column label="物料名称" align="center" prop="materialName" width="250" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="quality" /> <el-table-column label="数量" align="center" prop="quality" />
<el-table-column label="抽样数量" align="center" prop="sampleQuality" /> <el-table-column label="抽样数量" align="center" prop="sampleQuality" />
<el-table-column label="不合格数量" align="center" prop="noOkQuality" width="120"/> <el-table-column label="不合格数量" align="center" prop="noOkQuality" width="120"/>
@ -256,8 +256,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="工单号" prop="orderNo"> <el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入工单号" /> <el-input v-model="form.orderNo" placeholder="请选择订单号" >
<el-button slot="append" @click="handleSelectWorkOrder" icon="el-icon-search"></el-button>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -280,13 +282,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row <el-row>
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入批次号" />
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="生产时间" prop="incomeTime"> <el-form-item label="生产时间" prop="incomeTime">
<el-date-picker clearable <el-date-picker clearable
@ -310,6 +306,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-select v-model="form.incomeBatchNo" class="selectItem" placeholder="请选择批次" clearable>
<el-option v-for="(item,index) in batchList"
:key="index"
:label="item.batchCode"
:value="item.batchCode">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -372,6 +380,11 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--订单选择弹窗-->
<ItemSelectWorkOrder
ref="itemSelectWorkOrder"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrder>
<!--工作中心(车间)选择弹窗--> <!--工作中心(车间)选择弹窗-->
<ItemSelectWorkCenter <ItemSelectWorkCenter
ref="itemSelectWorkCenter" ref="itemSelectWorkCenter"
@ -391,14 +404,17 @@
</template> </template>
<script> <script>
import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,getCheckTypes,changeProduceStatus } from "@/api/quality/qcProduce"; import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,
getCheckTypes,changeProduceStatus,getBatchList
} from "@/api/quality/qcProduce";
import moment from 'moment'; import moment from 'moment';
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectWorkCenter from "./selectWorkCenter.vue"; import ItemSelectWorkCenter from "./selectWorkCenter.vue";
import ItemSelectUser from "../qcIncome/selectUser.vue"; import ItemSelectUser from "../qcIncome/selectUser.vue";
import ItemSelectProject from "../qcIncome/checkProjectType.vue"; import ItemSelectProject from "../qcIncome/checkProjectType.vue";
export default { export default {
name: "QcProduce", name: "QcProduce",
components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject}, components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
dicts: ["unit","check_status","check_result"], dicts: ["unit","check_status","check_result"],
data() { data() {
return { return {
@ -453,7 +469,7 @@ export default {
form: {}, form: {},
checkTypes:[], checkTypes:[],
batchList:[],
// //
rules: { rules: {
incomeBatchNo: [ incomeBatchNo: [
@ -655,6 +671,23 @@ export default {
}); });
}, },
/**工单选择弹出框**/
handleSelectWorkOrder() {
this.$refs.itemSelectWorkOrder.showFlag = true;
},
//
onSelectWorkOrder(obj) {
this.form.orderNo = obj.orderNo;
this.form.materialName = obj.materialName;
this.form.materialCode = obj.materialCode;
this.form.quality = obj.quality;
this.form.unit = obj.unit;
this.form.incomeTime = obj.incomeTime;
getBatchList(obj.workorderCode).then(response => {
this.batchList = response;
});
},
/**工作中心选择弹出框**/ /**工作中心选择弹出框**/
handleSelectWorkCenter() { handleSelectWorkCenter() {
this.$refs.itemSelectWorkCenter.showFlag = true; this.$refs.itemSelectWorkCenter.showFlag = true;

@ -0,0 +1,139 @@
<template>
<el-dialog title="生产订单号选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="订单号">
<el-input
v-model="queryParams.orderNo"
placeholder="订单号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="180"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="180"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" />
<el-table-column label="单位" align="left" prop="unit" :show-overflow-tooltip="true" />
<el-table-column label="生产日期" align="left" prop="incomeTime" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitLLOrderForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getWorkOrder } from "@/api/quality/income";
export default {
name: "itemSelectWorkOrder",
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: ''
},
selectionRow:{}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getWorkOrder(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
if(selection.length>1){
this.$modal.msgSuccess("只能选一个");
}
this.selectionRow = selection[0]
},
submitLLOrderForm() {
this.$emit('onSelected', this.selectionRow);
this.showFlag = false;
}
}
};
</script>
Loading…
Cancel
Save