质量调整

master
zhaoxiaolin 12 months ago
parent 48cba41dce
commit c9d0e531f0

@ -55,3 +55,21 @@ export function changeStatus(id,status) {
data: data
});
}
//批量添加检测项
export function submitProjects(data) {
return request({
url: '/quality/checkTypeProject/submitProjects',
method: 'post',
data: data
});
}
//获取检测项列表
export function getProjectInfoList(query) {
return request({
url: '/quality/checkTypeProject/getProjectInfoList',
method: 'get',
params: query
});
}

@ -773,7 +773,7 @@ export default {
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
if (!values.every(value => isNaN(value))&& column.label!='用人数') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {

@ -105,8 +105,8 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="检验规则名称" align="center" prop="ruleName" />
<el-table-column label="标准值" align="left" prop="standardValue" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" :show-overflow-tooltip="true" width="250"/>
<el-table-column label="标准值" align="left" prop="standardValue" :show-overflow-tooltip="true" width="250"/>
<el-table-column label="上差值" align="left" prop="upperDiff" />
<el-table-column label="下差值" align="left" prop="downDiff" />
<el-table-column label="单位" align="center" prop="unit" />
@ -221,6 +221,11 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 选择检测项目 -->
<SelectProject ref="child"
:workorderCode="form.workorderCode"
@onSelected="onSelectProjects"
></SelectProject>
</div>
</template>
@ -231,16 +236,17 @@ import {
delCheckTypeProject,
addCheckTypeProject,
updateCheckTypeProject,
changeStatus
changeStatus,
submitProjects
} from "@/api/quality/checkTypeProject";
import MaterialGroupAdd from "./MaterialGroupAdd.vue";
import {listCheckType} from "@/api/quality/checkType";
import {getProjectList} from "@/api/quality/project";
import SelectProject from "./selectProject.vue";
export default {
name: "CheckTypeProject",
dicts: ["qc_rule_prop",'unit'],
components: {MaterialGroupAdd,},
components: {MaterialGroupAdd,SelectProject},
data() {
return {
//
@ -355,6 +361,7 @@ export default {
groupId: null,
materialCode: null,
projectNo: null,
projectInfos:[]
};
this.resetForm("form");
},
@ -414,12 +421,17 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加物料检验项目维护";
this.form.groupId = this.groupId;
this.form.materialCode = this.materialCode;
this.form.typeId = this.editableTabsValue;
if(this.groupId==null||this.materialCode){
this.$modal.msgError("请点击左侧节点");
return
};
if(this.queryParams.typeId==null){
this.$modal.msgError("请选择头部节点");
retrun
};
this.$refs.child.showFlag = true;
this.$refs.child.init(this.groupId,this.materialCode,this.queryParams.typeId);
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -525,6 +537,25 @@ export default {
row.status = row.status === "0" ? "1" : "0";
});
},
//
onSelectProjects(objs) {
let _this = this;
objs.forEach(function(item,index,arr){
item.projectId = item.id;
item.projectNo = item.orderNum;
item.unit = item.unitCode;
item.standardValue = item.checkStandard;
item.typeId = _this.queryParams.typeId;
item.groupId = _this.groupId;
item.materialCode = _this.materialCode;
});
submitProjects(objs).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
},
},
};
</script>

@ -0,0 +1,170 @@
<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.ruleName"
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>
<!-- 序号 -->
<el-table-column label="检测项目Id" align="left" key="id" prop="id" v-if="false" />
<el-table-column label="检测项目编号" align="left" key="orderNum" prop="orderNum" width="110"/>
<el-table-column label="检测项目名称" align="left" key="ruleName" prop="ruleName" width="250" :show-overflow-tooltip="true" />
<el-table-column label="规则属性" align="left" prop="propertyCode">
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="检测标准" align="left" prop="checkStandard" width="250" :show-overflow-tooltip="true"/>
<el-table-column label="上差值" align="center" prop="upperDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.upperDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'></el-input>
</template>
</el-table-column>
<el-table-column label="下差值" align="center" prop="downDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.downDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'
></el-input>
</template>
</el-table-column>
<el-table-column label="测量单位" align="left" prop="unitCode" width="90"/>
<el-table-column label="抽样方案" align="left" prop="samplePlan" width="100"/>
<el-table-column label="合格判定" align="left" prop="judge"/ width="100">
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
</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="submitProjectItems"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getProjectInfoList } from "@/api/quality/checkTypeProject";
export default {
name: "itemSelectUser",
dicts: ["qc_rule_prop"],
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
selectionRows:[],
//
queryParams: {
pageNum: 1,
pageSize: 10,
groupId:null,
materialCode:null,
typeCode:null
}
};
},
created() {
//this.getList();
},
methods: {
init(groupId,materialCode,typeId){
this.queryParams.groupId = groupId;
this.queryParams.materialCode = materialCode;
this.queryParams.typeCode = typeId;
this.getList();
},
/** 查询表格列表*/
getList() {
this.loading = true;
getProjectInfoList(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) {
this.selectionRows = selection
},
handleEdit(index, row) {
console.log('row:',index, row);
},
submitProjectItems() {
if ( this.selectionRows==0) {
this.$modal.msgError(`请选择数据`);
return false;
}
this.$emit('onSelected', this.$refs.myTable.selection);
this.showFlag = false;
},
}
};
</script>

@ -92,8 +92,8 @@
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="检验规则编号" align="center" prop="orderNum" width="100"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" width="100"/>
<el-table-column label="检验规则编号" align="center" prop="orderNum" width="110"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="检验规则属性" align="center" prop="propertyCode" width="100">
<template slot-scope="scope">
<dict-tag
@ -206,6 +206,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="缺陷等级" prop="defectLevel">
<el-input type='textarea' v-model="form.defectLevel" placeholder="请输入检验标准" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="合格判定" prop="judge">

@ -62,7 +62,7 @@
</el-date-picker>
</el-form-item>
<!--
<el-form-item label="检测地点" prop="checkLoc">
<el-input
v-model="queryParams.checkLoc"
@ -78,7 +78,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="检验时间" prop="checkTimeArray">
<el-date-picker
v-model="queryParams.checkTimeArray"
@ -162,7 +162,7 @@
<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="任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" />
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true" />
<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="materialName" width="250" :show-overflow-tooltip="true" />
@ -242,7 +242,6 @@
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">

@ -9,6 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input
v-model="queryParams.incomeBatchNo"
@ -17,6 +18,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!--
<el-form-item label="订单号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
@ -24,7 +26,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="物料号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -33,6 +35,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!--
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
@ -40,7 +43,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="仓库名称" prop="supplierName">
<el-input
v-model="queryParams.supplierName"
@ -59,6 +62,7 @@
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<!--
<el-form-item label="检测地点" prop="checkLoc">
<el-input
v-model="queryParams.checkLoc"
@ -74,7 +78,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="检验时间" prop="checkTime">
<el-date-picker
v-model="queryParams.checkTimeArray"
@ -157,10 +161,10 @@
<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="检验任务编号" 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" :show-overflow-tooltip="true"/>
<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="materialName" width="150"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="170" />
<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="unit" />
<el-table-column label="仓库编码" align="center" prop="supplierCode" width="120"/>
@ -235,19 +239,28 @@
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入库批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入入库批次号" />
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="8">
<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-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
@ -255,30 +268,28 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入库数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="入库时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择入库时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
@ -291,6 +302,17 @@
</el-select>
</el-form-item>
</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-col :span="8">
@ -305,16 +327,7 @@
<el-input v-model="form.supplierCode" placeholder="请输入仓库编码" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入库时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择入库时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
@ -341,6 +354,11 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--订单选择弹窗-->
<ItemSelectWorkOrder
ref="itemSelectWorkOrder"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrder>
<!--产品物料选择弹窗-->
<ItemSelectMaterial
ref="itemSelectMaterial"
@ -366,7 +384,9 @@
<script>
import { listWarehousing, getWarehousing, delWarehousing, addWarehousing, updateWarehousing } from "@/api/quality/warehousing";
import { getBatchList} from "@/api/quality/qcProduce";
import { getCheckTypes } from "@/api/quality/qcProduce";
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectMaterial from "../qcIncome/selectMaterial.vue";
import ItemSelectLoc from "./selectLoc.vue";
import ItemSelectUser from "../qcIncome/selectUser.vue";
@ -374,7 +394,7 @@ import ItemSelectProject from "../qcIncome/checkProjectType.vue";
import moment from 'moment';
export default {
name: "Warehousing",
components: { ItemSelectMaterial,ItemSelectLoc,ItemSelectUser,ItemSelectProject},
components: { ItemSelectMaterial,ItemSelectLoc,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
dicts: ["unit","check_status","check_result"],
data() {
return {
@ -627,6 +647,22 @@ 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;
});
},
/**物料选择弹出框**/
handleSelectMaterial() {
this.$refs.itemSelectMaterial.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>

@ -116,7 +116,7 @@
>{{scope.row.routeCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="产品编码" align="center" prop="productCode" width="250"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="250" v-if="false"/>
<el-table-column label="工艺路线名称" align="center" prop="routeName" width="250"/>
<el-table-column label="工艺路线说明" align="center" prop="routeDesc" width="250"/>
<el-table-column label="工艺路线版本" align="center" prop="routeVersion" width="100"/>

Loading…
Cancel
Save