入库检验+工序拆合值

master
zhaoxiaolin 1 year ago
parent 1ed8764eda
commit def1b237a2

@ -119,9 +119,10 @@ export function commitActualValue(recordId, actualValues) {
} }
//审核结果提交 //审核结果提交
export function commitCheckResult(recordId) { export function commitCheckResult(recordId,typeCode) {
const data = { const data = {
recordId recordId,
typeCode
} }
return request({ return request({
url: '/quality/qcIncome/commitCheckResult', url: '/quality/qcIncome/commitCheckResult',

@ -52,11 +52,28 @@ export function getQcListWorkCenter(query) {
}); });
} }
// 查询工作中心列表 // 查询检测类型列表
export function getCheckTypes() { export function getCheckTypes(typeCode) {
const data = {
typeCode
}
return request({ return request({
url: '/quality/qcProduce/getCheckTypes', url: '/quality/qcProduce/getCheckTypes',
method: 'get' method: 'put',
data: data
}); });
} }
//状态修改
export function changeProduceStatus(recordId, status) {
const data = {
recordId,
status
}
return request({
url: '/quality/qcProduce/changeProduceStatus',
method: 'put',
data: data
})
}

@ -42,3 +42,13 @@ export function delWarehousing(recordId) {
method: 'delete' method: 'delete'
}); });
} }
// 查询工作中心列表
export function getQcListLoc(query) {
return request({
url: '/quality/qcWarehousing/getQcListLoc',
method: 'get',
params: query
});
}

@ -306,6 +306,7 @@ export default {
}, },
// //
onSelectMaterial(obj) { onSelectMaterial(obj) {
debugger
this.form.materialCode = obj.code[0]; this.form.materialCode = obj.code[0];
this.form.materialName = obj.name[0]; this.form.materialName = obj.name[0];
console.log(this.form.groupId); console.log(this.form.groupId);

@ -20,6 +20,8 @@
<el-table-column label="检验方式" align="left" prop="checkMode" :show-overflow-tooltip="true" /> <el-table-column label="检验方式" align="left" prop="checkMode" :show-overflow-tooltip="true" />
<el-table-column label="检验工具" align="left" prop="checkTool" :show-overflow-tooltip="true" /> <el-table-column label="检验工具" align="left" prop="checkTool" :show-overflow-tooltip="true" />
<el-table-column label="检验标准" align="left" prop="checkStandard" :show-overflow-tooltip="true" /> <el-table-column label="检验标准" align="left" prop="checkStandard" :show-overflow-tooltip="true" />
<el-table-column label="上差值" align="left" prop="upperDiff" :show-overflow-tooltip="true" />
<el-table-column label="下差值" align="left" prop="downDiff" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="left" prop="unitCode" :show-overflow-tooltip="true" width="80"/> <el-table-column label="单位" align="left" prop="unitCode" :show-overflow-tooltip="true" width="80"/>
<el-table-column label="检测结果" key="status" align="center" prop="status" width="90"> <el-table-column label="检测结果" key="status" align="center" prop="status" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
@ -129,6 +131,7 @@ export default {
valueOpen: false, valueOpen: false,
//id //id
recordId:'', recordId:'',
typeCode:'',//
}; };
}, },
created() { created() {
@ -136,10 +139,10 @@ export default {
}, },
methods: { methods: {
init(rowdata){ init(rowdata,typeCode){
this.data=rowdata this.data=rowdata;
this.queryParams.belongTo = this.data.recordId; this.queryParams.belongTo = this.data.recordId;
this.typeCode = typeCode;
this.getList(); this.getList();
}, },
@ -168,7 +171,7 @@ export default {
// //
submitBomForm() { submitBomForm() {
commitCheckResult(this.queryParams.belongTo).then(response => { commitCheckResult(this.queryParams.belongTo,this.typeCode).then(response => {
this.$modal.msgSuccess("检测完成"); this.$modal.msgSuccess("检测完成");
this.$emit('saveCheck'); this.$emit('saveCheck');
this.showFlag = false; this.showFlag = false;
@ -178,7 +181,7 @@ export default {
// /YN // /YN
handleStatusChange(row) { handleStatusChange(row) {
let text = row.status === "N" ? "不合格" : "合格"; let text = row.status === "N" ? "不合格" : "合格";
this.$modal.confirm('确认' + '"' + row.checkNo + '"'+text+'吗?').then(function() { this.$modal.confirm('确认' + '"' + row.projectNo + '"'+text+'吗?').then(function() {
return changeCheckDetailStatus(row.recordId, row.status); return changeCheckDetailStatus(row.recordId, row.status);
}).then(() => { }).then(() => {
this.$modal.msgSuccess(text + "操作成功"); this.$modal.msgSuccess(text + "操作成功");

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="任务编号" prop="checkNo"> <el-form-item label="任务编号" prop="checkNo">
<el-input <el-input
v-model="queryParams.checkNo" v-model="queryParams.checkNo"
@ -142,7 +142,7 @@
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/> <el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="来料时间" align="center" prop="incomeTime" width="180"> <el-table-column label="来料时间" align="center" prop="incomeTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测地点" align="center" prop="checkLoc" width="120"/> <el-table-column label="检测地点" align="center" prop="checkLoc" width="120"/>
@ -158,7 +158,7 @@
<el-table-column label="检测人姓名" align="center" prop="checkManName" width="100"/> <el-table-column label="检测人姓名" align="center" prop="checkManName" width="100"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180"> <el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检验结果" align="center" prop="checkResult" /> <el-table-column label="检验结果" align="center" prop="checkResult" />
@ -239,12 +239,24 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <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-form-item label="收货数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" /> <el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="单位" prop="unit" > <el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;"> <el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-option <el-option
@ -331,6 +343,7 @@
<script> <script>
import { listIncome, getIncome, delIncome, addIncome, updateIncome ,changeIncomeStatus} from "@/api/quality/income"; import { listIncome, getIncome, delIncome, addIncome, updateIncome ,changeIncomeStatus} from "@/api/quality/income";
import { getCheckTypes } from "@/api/quality/qcProduce";
import ItemSelectMaterial from "./selectMaterial.vue"; import ItemSelectMaterial from "./selectMaterial.vue";
import ItemSelectSupplier from "./selectSupplier.vue"; import ItemSelectSupplier from "./selectSupplier.vue";
import ItemSelectUser from "./selectUser.vue"; import ItemSelectUser from "./selectUser.vue";
@ -391,6 +404,7 @@ export default {
}, },
// //
form: {}, form: {},
checkTypes:[],
// //
rules: { rules: {
incomeBatchNo: [ incomeBatchNo: [
@ -426,9 +440,15 @@ export default {
created() { created() {
this.getDate(); this.getDate();
this.getList(); this.getList();
this.getCheckTypes();
}, },
methods: { methods: {
/****/
getCheckTypes() {
getCheckTypes('material').then(response => {
this.checkTypes = response;
});
},
/**获取默认查询时间段**/ /**获取默认查询时间段**/
getDate() { getDate() {
let start = this.Fungetdate (0) let start = this.Fungetdate (0)
@ -617,7 +637,7 @@ export default {
// //
handleCheckProject(row){ handleCheckProject(row){
this.$refs.itemSelectProject.showFlag = true; this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row); this.$refs.itemSelectProject.init(row,'material');
}, },
// //
saveCheck(){ saveCheck(){

@ -159,21 +159,21 @@
<el-table v-loading="loading" :data="qcProduceList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="qcProduceList" @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="id" align="center" prop="recordId" v-if="false"/> <el-table-column label="id" align="center" prop="recordId" v-if="false"/>
<el-table-column label="任务编号" align="center" prop="checkNo" /> <el-table-column label="任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="批次号" align="center" prop="batchNo" /> <el-table-column label="批次号" align="center" prop="batchNo" width="120"/>
<el-table-column label="订单号" align="center" prop="orderNo" /> <el-table-column label="订单号" align="center" prop="orderNo" width="120"/>
<el-table-column label="物料号" align="center" prop="materialCode" /> <el-table-column label="物料号" align="center" prop="materialCode" width="170"/>
<el-table-column label="物料名称" align="center" prop="materialName" /> <el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="数量" align="center" prop="quality" /> <el-table-column label="数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="车间编码" align="center" prop="carCode" /> <el-table-column label="车间编码" align="center" prop="carCode" width="120"/>
<el-table-column label="车间名称" align="center" prop="carName" /> <el-table-column label="车间名称" align="center" prop="carName" width="240"/>
<el-table-column label="生产时间" align="center" prop="produceDate" width="180"> <el-table-column label="生产时间" align="center" prop="produceDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.produceDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.produceDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测地点" align="center" prop="checkLoc" /> <el-table-column label="检测地点" align="center" prop="checkLoc" width="120"/>
<el-table-column label="检测状态" align="center" prop="checkStatus" > <el-table-column label="检测状态" align="center" prop="checkStatus" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
@ -182,11 +182,11 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测人工号" align="center" prop="checkManCode" /> <el-table-column label="检测人工号" align="center" prop="checkManCode" width="100"/>
<el-table-column label="检测人姓名" align="center" prop="checkManName" /> <el-table-column label="检测人姓名" align="center" prop="checkManName" width="100"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180"> <el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检验结果" align="center" prop="checkResult" /> <el-table-column label="检验结果" align="center" prop="checkResult" />
@ -266,8 +266,8 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检验类型" prop="typeCode" > <el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.typeCode" placeholder="请选择检验类型" style="width: 100%;"> <el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option <el-option
v-for="dict in checkTypes" v-for="dict in checkTypes"
:key="dict.id" :key="dict.id"
@ -368,7 +368,7 @@
</template> </template>
<script> <script>
import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,getCheckTypes } from "@/api/quality/qcProduce"; import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,getCheckTypes,changeProduceStatus } from "@/api/quality/qcProduce";
import moment from 'moment'; import moment from 'moment';
import ItemSelectMaterial from "../qcIncome/selectMaterial.vue"; import ItemSelectMaterial from "../qcIncome/selectMaterial.vue";
import ItemSelectWorkCenter from "./selectWorkCenter.vue"; import ItemSelectWorkCenter from "./selectWorkCenter.vue";
@ -461,6 +461,9 @@ export default {
checkLoc: [ checkLoc: [
{ required: true, message: "检测地点不能为空", trigger: "blur" } { required: true, message: "检测地点不能为空", trigger: "blur" }
], ],
checkType: [
{ required: true, message: "检测类型不能为空", trigger: "blur" }
]
} }
}; };
}, },
@ -472,7 +475,7 @@ export default {
methods: { methods: {
/****/ /****/
getCheckTypes() { getCheckTypes() {
getCheckTypes().then(response => { getCheckTypes('produce').then(response => {
this.checkTypes = response; this.checkTypes = response;
}); });
}, },
@ -619,11 +622,11 @@ export default {
...this.queryParams ...this.queryParams
}, `qcProduce_${new Date().getTime()}.xlsx`) }, `qcProduce_${new Date().getTime()}.xlsx`)
}, },
// //
handleStatusChange(row) { handleStatusChange(row) {
let text = row.status === "0" ? "停用" : "启用"; let text = row.status === "0" ? "停用" : "启用";
this.$modal.confirm('确认要"' + text + '""' + row.checkNo + '"吗?').then(function() { this.$modal.confirm('确认要"' + text + '""' + row.checkNo + '"吗?').then(function() {
return changeIncomeStatus(row.recordId, row.status); return changeProduceStatus(row.recordId, row.status);
}).then(() => { }).then(() => {
this.$modal.msgSuccess(text + "成功"); this.$modal.msgSuccess(text + "成功");
}).catch(function() { }).catch(function() {
@ -663,7 +666,7 @@ export default {
// //
handleCheckProject(row){ handleCheckProject(row){
this.$refs.itemSelectProject.showFlag = true; this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row); this.$refs.itemSelectProject.init(row,'produce');
}, },
// //
saveCheck(){ saveCheck(){

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="检验任务编号" prop="checkNo"> <el-form-item label="任务编号" prop="checkNo">
<el-input <el-input
v-model="queryParams.checkNo" v-model="queryParams.checkNo"
placeholder="请输入检验任务编号" placeholder="请输入检验任务编号"
@ -41,46 +41,25 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="quality"> <el-form-item label="仓库名称" prop="supplierName">
<el-input
v-model="queryParams.quality"
placeholder="请输入数量"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input
v-model="queryParams.unit"
placeholder="请输入单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商编码" prop="supplierCode">
<el-input
v-model="queryParams.supplierCode"
placeholder="请输入供应商编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="supplierName">
<el-input <el-input
v-model="queryParams.supplierName" v-model="queryParams.supplierName"
placeholder="请输入供应商名称" placeholder="请输入仓库名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="来料时间" prop="incomeTime"> <el-form-item label="入库时间" prop="incomeTimeArray">
<el-date-picker clearable <el-date-picker
v-model="queryParams.incomeTime" v-model="queryParams.incomeTimeArray"
type="date" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd" type="datetimerange"
placeholder="请选择来料时间"> range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="检测地点" prop="checkLoc"> <el-form-item label="检测地点" prop="checkLoc">
<el-input <el-input
v-model="queryParams.checkLoc" v-model="queryParams.checkLoc"
@ -89,15 +68,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="检测人工号" prop="checkManCode"> <el-form-item label="检测人" prop="checkManName">
<el-input
v-model="queryParams.checkManCode"
placeholder="请输入检测人工号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测人姓名" prop="checkManName">
<el-input <el-input
v-model="queryParams.checkManName" v-model="queryParams.checkManName"
placeholder="请输入检测人姓名" placeholder="请输入检测人姓名"
@ -106,60 +77,28 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="检验时间" prop="checkTime"> <el-form-item label="检验时间" prop="checkTime">
<el-date-picker clearable <el-date-picker
v-model="queryParams.checkTime" v-model="queryParams.checkTimeArray"
type="date" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd" type="datetimerange"
placeholder="请选择检验时间"> range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="检验结果Y合格" prop="checkResult"> <el-form-item label="检验结果" prop="checkResult">
<el-input <el-select
v-model="queryParams.checkResult" v-model="queryParams.checkResult"
placeholder="请输入检验结果Y合格" placeholder="检验结果"
clearable clearable
@keyup.enter.native="handleQuery" >
/> <el-option
</el-form-item> v-for="dict in dict.type.check_result"
<el-form-item label="预留字段1" prop="attr1"> :key="dict.value"
<el-input :label="dict.label"
v-model="queryParams.attr1" :value="dict.value"
placeholder="请输入预留字段1"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="预留字段2" prop="attr2">
<el-input
v-model="queryParams.attr2"
placeholder="请输入预留字段2"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="预留字段3" prop="attr3">
<el-input
v-model="queryParams.attr3"
placeholder="请输入预留字段3"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="预留字段4" prop="attr4">
<el-input
v-model="queryParams.attr4"
placeholder="请输入预留字段4"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工厂编码" prop="factoryCode">
<el-input
v-model="queryParams.factoryCode"
placeholder="请输入工厂编码"
clearable
@keyup.enter.native="handleQuery"
/> />
</el-select>
</el-form-item> </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>
@ -178,6 +117,7 @@
v-hasPermi="['quality:qcWarehousing:add']" v-hasPermi="['quality:qcWarehousing:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<!--
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -199,7 +139,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['quality:qcWarehousing:remove']" v-hasPermi="['quality:qcWarehousing:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -215,53 +155,65 @@
<el-table v-loading="loading" :data="warehousingList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="warehousingList" @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="id" align="center" prop="recordId" /> <el-table-column label="id" align="center" prop="recordId" v-if="false"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" /> <el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="批次号" align="center" prop="batchNo" /> <el-table-column label="批次号" align="center" prop="batchNo" width="120"/>
<el-table-column label="订单号" align="center" prop="orderNo" /> <el-table-column label="订单号" align="center" prop="orderNo" width="120"/>
<el-table-column label="物料号" align="center" prop="materialCode" /> <el-table-column label="物料号" align="center" prop="materialCode" width="170"/>
<el-table-column label="物料名称" align="center" prop="materialName" /> <el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="数量" align="center" prop="quality" /> <el-table-column label="数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商编码" align="center" prop="supplierCode" /> <el-table-column label="仓库编码" align="center" prop="supplierCode" width="120"/>
<el-table-column label="供应商名称" align="center" prop="supplierName" /> <el-table-column label="仓库名称" align="center" prop="supplierName" width="120"/>
<el-table-column label="来料时间" align="center" prop="incomeTime" width="180"> <el-table-column label="入库时间" align="center" prop="incomeTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测地点" align="center" prop="checkLoc" /> <el-table-column label="检测地点" align="center" prop="checkLoc" />
<el-table-column label="检测状态" align="center" prop="checkStatus" /> <el-table-column label="检测状态" align="center" prop="checkStatus" >
<el-table-column label="检测人工号" align="center" prop="checkManCode" /> <template slot-scope="scope">
<el-table-column label="检测人姓名" align="center" prop="checkManName" /> <dict-tag
:options="dict.type.check_status"
:value="scope.row.checkStatus"
/>
</template>
</el-table-column>
<el-table-column label="检测人工号" align="center" prop="checkManCode" width="100"/>
<el-table-column label="检测人姓名" align="center" prop="checkManName" width="100"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180"> <el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="检验结果" align="center" prop="checkResult" />
<el-table-column label="是否启用" align="center" width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="1"
inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检验结果Y合格" align="center" prop="checkResult" />
<el-table-column label="是否启用1启用0停用" align="center" prop="status" />
<el-table-column label="预留字段1" align="center" prop="attr1" />
<el-table-column label="预留字段2" align="center" prop="attr2" />
<el-table-column label="预留字段3" align="center" prop="attr3" />
<el-table-column label="预留字段4" align="center" prop="attr4" />
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcWarehousing:edit']" v-hasPermi="['quality:qcWarehousing:edit']"
>修改</el-button> >检验</el-button>
<!--
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['quality:qcWarehousing:remove']" v-hasPermi="['quality:qcWarehousing:remove']"
>删除</el-button> >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -275,95 +227,155 @@
/> />
<!-- 添加或修改成品入库检验任务对话框 --> <!-- 添加或修改成品入库检验任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="检验任务编号" prop="checkNo"> <el-row>
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" /> <el-col :span="8">
</el-form-item> <el-form-item label="检验任务编号" prop="checkNo">
<el-form-item label="批次号" prop="batchNo"> <el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
<el-input v-model="form.batchNo" placeholder="请输入批次号" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="订单号" prop="orderNo"> <el-col :span="8">
<el-input v-model="form.orderNo" placeholder="请输入订单号" /> <el-form-item label="入库批次号" prop="batchNo">
</el-form-item> <el-input v-model="form.batchNo" placeholder="请输入入库批次号" />
<el-form-item label="物料号" prop="materialCode"> </el-form-item>
<el-input v-model="form.materialCode" placeholder="请输入物料号" /> </el-col>
</el-form-item> <el-col :span="8">
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.materialName" placeholder="请输入物料名称" /> <el-input v-model="form.orderNo" placeholder="请输入订单号" />
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="quality"> </el-col>
<el-input v-model="form.quality" placeholder="请输入数量" /> </el-row>
</el-form-item> <el-row>
<el-form-item label="单位" prop="unit"> <el-col :span="12">
<el-input v-model="form.unit" placeholder="请输入单位" /> <el-form-item label="物料名称" prop="materialName">
</el-form-item> <el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-form-item label="供应商编码" prop="supplierCode"> <el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
<el-input v-model="form.supplierCode" placeholder="请输入供应商编码" /> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="供应商名称" prop="supplierName"> </el-col>
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" />
</el-form-item> <el-col :span="12">
<el-form-item label="来料时间" prop="incomeTime"> <el-form-item label="物料号" prop="materialCode">
<el-date-picker clearable <el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
v-model="form.incomeTime" </el-form-item>
type="date" </el-col>
value-format="yyyy-MM-dd" </el-row>
placeholder="请选择来料时间"> <el-row>
</el-date-picker> <el-col :span="8">
</el-form-item> <el-form-item label="检验类型" prop="checkType" >
<el-form-item label="检测地点" prop="checkLoc"> <el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" /> <el-option
</el-form-item> v-for="dict in checkTypes"
<el-form-item label="检测人工号" prop="checkManCode"> :key="dict.id"
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" /> :label="dict.checkName"
</el-form-item> :value="dict.id"
<el-form-item label="检测人姓名" prop="checkManName"> ></el-option>
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" /> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="检验时间" prop="checkTime"> </el-col>
<el-date-picker clearable <el-col :span="8">
v-model="form.checkTime" <el-form-item label="入库数量" prop="quality">
type="date" <el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
value-format="yyyy-MM-dd" </el-form-item>
placeholder="请选择检验时间"> </el-col>
</el-date-picker> <el-col :span="8">
</el-form-item> <el-form-item label="单位" prop="unit" >
<el-form-item label="检验结果Y合格" prop="checkResult"> <el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-input v-model="form.checkResult" placeholder="请输入检验结果Y合格" /> <el-option
</el-form-item> v-for="dict in dict.type.unit"
<el-form-item label="预留字段1" prop="attr1"> :key="dict.value"
<el-input v-model="form.attr1" placeholder="请输入预留字段1" /> :label="dict.label"
</el-form-item> :value="dict.value"
<el-form-item label="预留字段2" prop="attr2"> ></el-option>
<el-input v-model="form.attr2" placeholder="请输入预留字段2" /> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="预留字段3" prop="attr3"> </el-col>
<el-input v-model="form.attr3" placeholder="请输入预留字段3" /> </el-row>
</el-form-item> <el-row>
<el-form-item label="预留字段4" prop="attr4"> <el-col :span="8">
<el-input v-model="form.attr4" placeholder="请输入预留字段4" /> <el-form-item label="仓库名称" prop="supplierName">
</el-form-item> <el-input v-model="form.supplierName" placeholder="请选择仓库名称">
<el-form-item label="工厂编码" prop="factoryCode"> <el-button slot="append" @click="handleSelectLoc" icon="el-icon-search"></el-button>
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" /> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="删除标识1删除0正常" prop="delFlag"> </el-col>
<el-input v-model="form.delFlag" placeholder="请输入删除标识1删除0正常" /> <el-col :span="8">
</el-form-item> <el-form-item label="仓库编码" prop="supplierCode">
<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">
<el-form-item label="检测人姓名" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请选择检测人姓名">
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检测人工号" prop="checkManCode" >
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检测地点" prop="checkLoc">
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" />
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--产品物料选择弹窗-->
<ItemSelectMaterial
ref="itemSelectMaterial"
@onSelected="onSelectMaterial"
></ItemSelectMaterial>
<!--仓库选择弹窗-->
<ItemSelectLoc
ref="itemSelectLoc"
@onSelected="onSelectLoc"
></ItemSelectLoc>
<!--人员选择弹窗-->
<ItemSelectUser
ref="itemSelectUser"
@onSelected="onSelectUser"
></ItemSelectUser>
<!--检验项目弹窗-->
<ItemSelectProject
ref="itemSelectProject"
@saveCheck="saveCheck"
></ItemSelectProject>
</div> </div>
</template> </template>
<script> <script>
import { listWarehousing, getWarehousing, delWarehousing, addWarehousing, updateWarehousing } from "@/api/quality/warehousing"; import { listWarehousing, getWarehousing, delWarehousing, addWarehousing, updateWarehousing } from "@/api/quality/warehousing";
import { getCheckTypes } from "@/api/quality/qcProduce";
import ItemSelectMaterial from "../qcIncome/selectMaterial.vue";
import ItemSelectLoc from "./selectLoc.vue";
import ItemSelectUser from "../qcIncome/selectUser.vue";
import ItemSelectProject from "../qcIncome/checkProjectType.vue";
import moment from 'moment';
export default { export default {
name: "Warehousing", name: "Warehousing",
components: { ItemSelectMaterial,ItemSelectLoc,ItemSelectUser,ItemSelectProject},
dicts: ["unit","check_status","check_result"],
data() { data() {
return { return {
// //
@ -386,6 +398,8 @@ export default {
open: false, open: false,
// //
queryParams: { queryParams: {
incomeTimeArray: [],
checkTimeArray: [],
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
checkNo: null, checkNo: null,
@ -415,19 +429,80 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
factoryCode: [ batchNo: [
{ required: true, message: "工厂编码不能为空", trigger: "blur" } { required: true, message: "批次号不能为空", trigger: "blur" }
], ],
} orderNo: [
{ required: true, message: "订单号不能为空", trigger: "blur" }
],
materialName: [
{ required: true, message: "物料号不能为空", trigger: "blur" }
],
quality: [
{ required: true, message: "数量不能为空", trigger: "blur" }
],
unit: [
{ required: true, message: "单位不能为空", trigger: "blur" }
],
supplierName: [
{ required: true, message: "仓库不能为空", trigger: "blur" }
],
incomeTime: [
{ required: true, message: "入库时间不能为空", trigger: "blur" }
],
checkManName: [
{ required: true, message: "检测人不能为空", trigger: "blur" }
],
checkLoc: [
{ required: true, message: "检测地点不能为空", trigger: "blur" }
]
},
checkTypes:[]
}; };
}, },
created() { created() {
this.getDate();
this.getList(); this.getList();
this.getCheckTypes();
}, },
methods: { methods: {
/****/
getCheckTypes() {
getCheckTypes('product').then(response => {
this.checkTypes = response;
});
},
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
let end = this.Fungetdate (1)
this.queryParams.incomeTimeArray.push(start,end)
//this.queryParams.checkTimeArray.push(start,end)
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d+" 00:00:00";
},
/** 查询成品入库检验任务列表 */ /** 查询成品入库检验任务列表 */
getList() { getList() {
this.loading = true; this.loading = true;
if(this.queryParams.incomeTimeArray.length>0){
this.queryParams.incomeTimeStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.incomeTimeEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}
if(this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}
listWarehousing(this.queryParams).then(response => { listWarehousing(this.queryParams).then(response => {
this.warehousingList = response.rows; this.warehousingList = response.rows;
this.total = response.total; this.total = response.total;
@ -540,6 +615,56 @@ export default {
this.download('qcWarehousing/warehousing/export', { this.download('qcWarehousing/warehousing/export', {
...this.queryParams ...this.queryParams
}, `warehousing_${new Date().getTime()}.xlsx`) }, `warehousing_${new Date().getTime()}.xlsx`)
},
//
handleStatusChange(row) {
let text = row.status === "0" ? "停用" : "启用";
this.$modal.confirm('确认要"' + text + '""' + row.checkNo + '"吗?').then(function() {
return changeProduceStatus(row.recordId, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === "0" ? "1" : "0";
});
},
/**物料选择弹出框**/
handleSelectMaterial() {
this.$refs.itemSelectMaterial.showFlag = true;
},
//
onSelectMaterial(obj) {
this.form.materialCode = obj.code;
this.form.materialName = obj.name;
},
/**仓库选择弹出框**/
handleSelectLoc() {
this.$refs.itemSelectLoc.showFlag = true;
},
//
onSelectLoc(obj) {
this.form.supplierCode = obj.code;
this.form.supplierName = obj.name;
},
/**人员选择弹出框**/
handleSelectUser() {
this.$refs.itemSelectUser.showFlag = true;
},
//
onSelectUser(obj) {
this.form.checkManCode = obj.code;
this.form.checkManName = obj.name;
},
//
handleCheckProject(row){
this.$refs.itemSelectProject.showFlag = true;
this.$refs.itemSelectProject.init(row,'product');
},
//
saveCheck(){
this.getList();
} }
} }
}; };

@ -0,0 +1,144 @@
<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="center">
<el-form-item label="仓库编码">
<el-input
v-model="queryParams.supplierCode"
placeholder="仓库编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仓库名称">
<el-input
v-model="queryParams.supplierName"
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="仓库编码" align="left" key="supplierCode" prop="supplierCode" :show-overflow-tooltip="true" />
<el-table-column label="仓库名称" align="left" key="supplierName" prop="supplierName" :show-overflow-tooltip="true" />
</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="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getQcListLoc } from "@/api/quality/warehousing";
export default {
name: "itemSelectLoc",
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,
supplierCode: '',
supplierName : ''
}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getQcListLoc(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.ids = selection[0].supplierCode;
this.idsName = selection[0].supplierName;
},
submitBomForm() {
this.selectedRows.code = this.ids;
this.selectedRows.name = this.idsName;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
}
}
};
</script>

@ -129,6 +129,12 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="拆合值"
align="center"
prop="splitMergNum"
:show-overflow-tooltip="true"
/>
<el-table-column <el-table-column
label="工作中心" label="工作中心"
align="center" align="center"
@ -253,12 +259,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--
<el-col :span="8"> <el-col :span="8">
<el-form-item label="拆合值" prop="splitMergeNum"> <el-form-item label="拆合值" prop="splitMergNum">
<el-input v-model="form.splitMergeNum" placeholder="请输入拆分&合并数量" /> <el-input v-model="form.splitMergNum" placeholder="请输入拆分&合并数量" />
</el-form-item> </el-form-item>
</el-col>--> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="工作时间" prop="workTime"> <el-form-item label="工作时间" prop="workTime">
<el-input-number <el-input-number
@ -368,23 +373,6 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>
<el-col :span="8">
<el-form-item label="参数1温度" prop="param1">
<el-input v-model="form.param1" type="input" placeholder="请输入温度" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="参数2湿度" prop="param2">
<el-input v-model="form.param2" type="input" placeholder="请输入湿度" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="参数3" prop="param3">
<el-input v-model="form.param3" type="input" placeholder="请输入参数3" />
</el-form-item>
</el-col>
</el-row> -->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="工序SOP" prop="fileList"> <el-form-item label="工序SOP" prop="fileList">

Loading…
Cancel
Save