成品检验

yangwl
zhaoxiaolin 6 months ago
parent fadd297211
commit 2fe43351d8

@ -352,3 +352,15 @@ export function deleteReportNow(reportCode) {
method: 'delete' method: 'delete'
}); });
} }
//预报工
export function preReportRow(reportCode) {
const data = {
reportCode
}
return request({
url: '/mes/reportWork/preReportRow',
method: 'post',
data: data
});
}

@ -362,30 +362,42 @@
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantityFeedback" <el-input type="number" size="small" v-model="scope.row.quantityFeedback"
@change="handleEdit(scope.$index, scope.row)"></el-input> @change="handleEdit(scope.$index, scope.row)"
:disabled="scope.row.attr1=='1'"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工时数" align="center" prop="workTime" width="120"> <el-table-column label="工时数" align="center" prop="workTime" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.workTime" <el-input type="number" size="small" v-model="scope.row.workTime"
@change="handleEdit(scope.$index, scope.row)"></el-input> @change="handleEdit(scope.$index, scope.row)"
:disabled="scope.row.attr1=='1'"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用人数" align="center" prop="useMan"> <el-table-column label="用人数" align="center" prop="useMan">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.useMan" <el-input type="number" size="small" v-model="scope.row.useMan"
@change="handleEdit(scope.$index, scope.row)"></el-input> @change="handleEdit(scope.$index, scope.row)"
:disabled="scope.row.attr1=='1'"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报工单编号" align="center" prop="reportCode" width="120" /> <el-table-column label="报工单编号" align="center" prop="reportCode" width="120" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150" /> <el-table-column label="创建时间" align="center" prop="createTime" width="150" />
<el-table-column fixed="right" label="操作" width="90"> <!--
<el-table-column fixed="right" label="操作" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click.native.prevent="deleteReportRow(scope.$index, item.libList)" size="small" type="danger" plain <el-button @click.native.prevent="deleteReportRow(scope.$index, item.libList)" size="small" type="danger" plain
v-if="item.libId == 'order1'"> v-if="item.libId == 'order1'&&scope.row.uploadStatus!='1'&&scope.row.attr1!= '1'">
删除</el-button> 删除</el-button>
<el-button @click.native.prevent="preReportRow(scope.$index, item.libList)" size="small" type="success" plain
v-if="item.libId == 'order1'&&scope.row.attr1!='1'&&scope.row.uploadStatus!='1'" >
预报工</el-button>
</template> </template>
</el-table-column> </el-table-column>
-->
</el-table> </el-table>
<div class="demo-input-suffix"> <div class="demo-input-suffix">
@ -398,7 +410,7 @@
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel" v-if="optType == 'view'"></el-button> <el-button type="primary" @click="cancel" v-if="optType == 'view'"></el-button>
<el-button type="primary" @click="submitReport" v-else> </el-button> <el-button type="primary" :disabled="loading" @click="submitReport" v-else> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -645,7 +657,7 @@ import {
submitReportPS, submitReportPS,
submitReportPSSAP, submitReportPSSAP,
getCKList, getCKList,
getPutInOrderList, getPutInOrderList,preReportRow
} from "@/api/mes/reportWork"; } from "@/api/mes/reportWork";
import { import {
getConsumeList, getConsumeList,
@ -1227,7 +1239,7 @@ export default {
this.pReportRows = allRows.reduce((acc, cur) => { this.pReportRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some( const hasDuplicate = acc.some(
(item) => (item) =>
item.batch === cur.batch && item.workorderCode === cur.workorderCode item.batch === cur.batch && item.workorderCode === cur.workorderCode && item.reportCode === cur.reportCode
); );
if (!hasDuplicate) { if (!hasDuplicate) {
acc.push(cur); acc.push(cur);
@ -1257,7 +1269,7 @@ export default {
this.pReportRows = allRows.reduce((acc, cur) => { this.pReportRows = allRows.reduce((acc, cur) => {
const hasDuplicate = acc.some( const hasDuplicate = acc.some(
(item) => (item) =>
item.batch === cur.batch && item.workorderCode === cur.workorderCode item.batch === cur.batch && item.workorderCode === cur.workorderCode && item.reportCode === cur.reportCode
); );
if (!hasDuplicate) { if (!hasDuplicate) {
acc.push(cur); acc.push(cur);
@ -1545,12 +1557,37 @@ export default {
}).catch(() => {}); }).catch(() => {});
}, },
//--
preReportRow(index, rows) {
let _this = this;
this.$modal.confirm('是否确认预报工?').then(function() {
_this.loading = true;
return preReportRow(rows[index].reportCode);
}).then(() => {
this.$modal.msgSuccess("预报工成功");
debugger
var sr = rows[index];
this.queryParams.workorderCode = sr.workorderCode;
this.queryParams.machineCode = sr.machineCode;
//
getAllLevelReportList(this.queryParams).then((response) => {
this.queryParams.workorderCode = "";
this.queryParams.machineCode = "";
this.openReport = true;
this.titleReport = "工单报工详情";
this.libTabs = response;
});
_this.loading = false;
}).catch(() => {});
},
//-- //--
deleteBomRow(index, rows) { deleteBomRow(index, rows) {
this.$modal this.$modal
.confirm("是否确认删除?确认后,不需要点击下方确定,立马删除!") .confirm("是否确认删除?确认后,不需要点击下方确定,立马删除!")
.then(function () { .then(function () {
if (rows[index].recordId != null) { if (rows[index].recordId != null) {
this.loading = true;
return deleteBomRowNow(rows[index].recordId); return deleteBomRowNow(rows[index].recordId);
} }
}) })
@ -1567,6 +1604,7 @@ export default {
this.pConsumeRows = newPConsumeRows; this.pConsumeRows = newPConsumeRows;
rows.splice(index, 1); rows.splice(index, 1);
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
this.loading = false;
}) })
.catch(() => {}); .catch(() => {});
}, },

@ -905,13 +905,7 @@ export default {
], ],
batchQuantity: [ batchQuantity: [
{required: true, message: "当前批次数量不能为空", trigger: "blur"} {required: true, message: "当前批次数量不能为空", trigger: "blur"}
], ]
newBatchCode: [
{required: true, message: "新批次编码不能为空", trigger: "blur"}
],
newBatchQuantity: [
{required: true, message: "新批次数量不能为空", trigger: "blur"}
],
}, },
/**********************************/ /**********************************/
eRouteProps: {multiple: true}, eRouteProps: {multiple: true},

@ -17,13 +17,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item v-show="false" label="检测项目名称" prop="projectType"> <el-form-item label="检测方案名称" prop="projectType">
<el-input <el-select v-model="queryParams.projectType" filterable clearable placeholder="请选择检测方案">
v-model="queryParams.projectType" <el-option
placeholder="检测方案代码" v-for="(item,index) in projectTypeOptions"
clearable :key="index"
style="width: 240px" :label="item.projectTypeName"
/> :value="item.projectTypeCode">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -32,17 +34,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="5" :xs="24"> <el-col :span="24" :xs="24">
<el-tabs v-model="editTabsValue" @tab-click="handleClick" :tab-position="'right'" style="height: 600px;">
<el-tab-pane
v-for="(item) in projectTypeOptions"
:key="item.projectTypeCode"
:label="item.projectTypeName"
:name="item.projectTypeCode"
>{{ item.projectTypeName }}</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="19" :xs="24">
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" > <el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"> <el-table-column width="50" align="center" type="selection">
</el-table-column> </el-table-column>

@ -758,6 +758,7 @@ export default {
this.form.quality = obj.quality; this.form.quality = obj.quality;
this.form.unit = obj.unit; this.form.unit = obj.unit;
this.form.incomeTime = obj.incomeTime; this.form.incomeTime = obj.incomeTime;
this.form.checkLoc = obj.checkLocName;
getBatchList(obj.workorderCode).then(response => { getBatchList(obj.workorderCode).then(response => {
this.batchList = response; this.batchList = response;
}); });

@ -32,6 +32,7 @@
<el-table-column label="产品名称" align="left" prop="materialName" width="200"/> <el-table-column label="产品名称" align="left" prop="materialName" width="200"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" /> <el-table-column label="排产数量" align="left" prop="quality" width="100" />
<el-table-column label="单位" align="left" prop="unit" width="80"/> <el-table-column label="单位" align="left" prop="unit" width="80"/>
<el-table-column label="检验地点" align="left" prop="checkLocName" width="80"/>
<el-table-column label="生产日期" align="left" prop="incomeTime" width="100" > <el-table-column label="生产日期" align="left" prop="incomeTime" width="100" >
<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}') }}</span>

@ -1,6 +1,18 @@
<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="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="检验节点" prop="checkType">
<el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="任务编号" prop="checkNo"> <el-form-item label="任务编号" prop="checkNo">
<el-input <el-input
v-model="queryParams.checkNo" v-model="queryParams.checkNo"
@ -43,7 +55,7 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item>--> </el-form-item>
<el-form-item label="仓库名称" prop="supplierName"> <el-form-item label="仓库名称" prop="supplierName">
<el-input <el-input
v-model="queryParams.supplierName" v-model="queryParams.supplierName"
@ -51,7 +63,7 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>-->
<el-form-item label="入库时间" prop="incomeTimeArray"> <el-form-item label="入库时间" prop="incomeTimeArray">
<el-date-picker <el-date-picker
v-model="queryParams.incomeTimeArray" v-model="queryParams.incomeTimeArray"
@ -131,7 +143,7 @@
v-hasPermi="['quality:qcWarehousing:edit']" v-hasPermi="['quality:qcWarehousing:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
plain plain
@ -141,7 +153,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"
@ -166,15 +178,16 @@
}}</el-button> }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true"/>-->
<el-table-column label="订单号" align="center" prop="orderNo" width="130"/> <el-table-column label="订单号" align="center" prop="orderNo" width="130"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="检验节点" align="center" prop="checkName" />
<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="250" :show-overflow-tooltip="true"/> <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="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="仓库编码" align="center" prop="supplierCode" width="120"/> <el-table-column label="车间编码" align="center" prop="supplierCode" width="120"/>
<el-table-column label="仓库名称" align="center" prop="supplierName" width="120"/> <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} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
@ -205,14 +218,6 @@
@click="handleCheckProject(scope.row)" @click="handleCheckProject(scope.row)"
v-hasPermi="['quality:qcWarehousing:edit']" v-hasPermi="['quality:qcWarehousing:edit']"
>检验</el-button> >检验</el-button>
<!--
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['quality:qcWarehousing:remove']"
>删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -321,6 +326,7 @@
</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="supplierName"> <el-form-item label="仓库名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择仓库名称"> <el-input v-model="form.supplierName" placeholder="请选择仓库名称">
@ -332,8 +338,19 @@
<el-form-item label="仓库编码" prop="supplierCode"> <el-form-item label="仓库编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入仓库编码" disabled/> <el-input v-model="form.supplierCode" placeholder="请输入仓库编码" disabled/>
</el-form-item> </el-form-item>
</el-col>-->
<el-col :span="8">
<el-form-item label="车间名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请输入所属车间名称" >
<el-button slot="append" @click="handleSelectWorkCenter" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="车间编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入所属车间编码" disabled/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -370,11 +387,16 @@
ref="itemSelectMaterial" ref="itemSelectMaterial"
@onSelected="onSelectMaterial" @onSelected="onSelectMaterial"
></ItemSelectMaterial> ></ItemSelectMaterial>
<!--仓库选择弹窗--> <!--仓库选择弹窗
<ItemSelectLoc <ItemSelectLoc
ref="itemSelectLoc" ref="itemSelectLoc"
@onSelected="onSelectLoc" @onSelected="onSelectLoc"
></ItemSelectLoc> ></ItemSelectLoc>-->
<!--工作中心(车间)选择弹窗-->
<ItemSelectWorkCenter
ref="itemSelectWorkCenter"
@onSelected="onSelectWorkCenter"
></ItemSelectWorkCenter>
<!--人员选择弹窗--> <!--人员选择弹窗-->
<ItemSelectUser <ItemSelectUser
ref="itemSelectUser" ref="itemSelectUser"
@ -392,16 +414,18 @@
import { listWarehousing, getWarehousing, delWarehousing, addWarehousing, updateWarehousing } from "@/api/quality/warehousing"; import { listWarehousing, getWarehousing, delWarehousing, addWarehousing, updateWarehousing } from "@/api/quality/warehousing";
import { getBatchList} from "@/api/quality/qcProduce"; import { getBatchList} from "@/api/quality/qcProduce";
import { getCheckTypes } from "@/api/quality/qcProduce"; import { getCheckTypes } from "@/api/quality/qcProduce";
import ItemSelectWorkOrder from "./selectProductWorkOrder.vue"; //import ItemSelectWorkOrder from "./selectProductWorkOrder.vue";
import ItemSelectWorkOrder from "../qcProduce/selectWorkOrder.vue";
import ItemSelectWorkCenter from "../qcProduce/selectWorkCenter";
import ItemSelectMaterial from "../qcIncome/selectMaterial.vue"; import ItemSelectMaterial from "../qcIncome/selectMaterial.vue";
import ItemSelectLoc from "./selectLoc.vue"; //import ItemSelectLoc from "./selectLoc.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";
import moment from 'moment'; import moment from 'moment';
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js"; import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
export default { export default {
name: "Warehousing", name: "Warehousing",
components: { ItemSelectMaterial,ItemSelectLoc,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder}, components: { ItemSelectMaterial,ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
dicts: ["unit","check_status","check_result"], dicts: ["unit","check_status","check_result"],
data() { data() {
return { return {
@ -476,9 +500,9 @@ export default {
incomeTime: [ incomeTime: [
{ required: true, message: "入库时间不能为空", trigger: "blur" } { required: true, message: "入库时间不能为空", trigger: "blur" }
], ],
checkManName: [ //checkManName: [
{ required: true, message: "检测人不能为空", trigger: "blur" } // { required: true, message: "", trigger: "blur" }
], //],
checkLoc: [ checkLoc: [
{ required: true, message: "检测地点不能为空", trigger: "blur" } { required: true, message: "检测地点不能为空", trigger: "blur" }
] ]
@ -677,6 +701,7 @@ export default {
this.form.quality = obj.quality; this.form.quality = obj.quality;
this.form.unit = obj.unit; this.form.unit = obj.unit;
this.form.incomeTime = obj.incomeTime; this.form.incomeTime = obj.incomeTime;
this.form.checkLoc = obj.checkLocName;
getBatchList(obj.workorderCode).then(response => { getBatchList(obj.workorderCode).then(response => {
this.batchList = response; this.batchList = response;
}); });
@ -691,6 +716,16 @@ export default {
this.form.materialName = obj.name; this.form.materialName = obj.name;
}, },
/**工作中心选择弹出框**/
handleSelectWorkCenter() {
this.$refs.itemSelectWorkCenter.showFlag = true;
},
//
onSelectWorkCenter(obj) {
this.form.supplierCode = obj.code;
this.form.supplierName = obj.name;
},
/**仓库选择弹出框**/ /**仓库选择弹出框**/
handleSelectLoc() { handleSelectLoc() {
this.$refs.itemSelectLoc.showFlag = true; this.$refs.itemSelectLoc.showFlag = true;

Loading…
Cancel
Save